{"record":{"id":"dae4dc39ee7c2019","repo":"neoclide/coc.nvim","slug":"unable-to-open-list-window","errorCode":null,"errorMessage":"Unable to open list window.","messagePattern":"Unable to open list window\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/model/quickpick.ts","lineNumber":200,"sourceCode":"    let rounded = !!preferences.rounded\n    await input.show(this.title, {\n      quickpick: lines,\n      position: 'center',\n      placeHolder: this.placeholder,\n      marginTop: 10,\n      border: [1, 1, 0, 1],\n      list: true,\n      rounded,\n      minWidth,\n      maxWidth: this.maxWidth,\n      highlight: preferences.floatHighlight,\n      borderhighlight: preferences.floatBorderHighlight\n    })\n    let opts: any = { lines, rounded, maxHeight, highlights, linecount: Math.max(1, lincount) }\n    if (preferences.floatHighlight !== undefined) opts.highlight = preferences.floatHighlight\n    if (preferences.floatBorderHighlight !== undefined) opts.borderhighlight = preferences.floatBorderHighlight\n    let res = await nvim.call('coc#dialog#create_list', [input.winid, input.dimension, opts])\n    if (!res) throw new Error('Unable to open list window.')\n    // let height\n    this.win = new Popup(nvim, res[0], res[1], lines.length)\n    this.win.refreshScrollbar()\n    this.bufnr = res[1]\n    this.setCursor(0)\n    this.attachEvents(input.bufnr)\n  }\n\n  private buildList(items: ReadonlyArray<T>, input: string, loose = false): { lines: string[], highlights: HighlightItem[] } {\n    let { selectedItems, canSelectMany } = this\n    let filteredItems: T[] = []\n    let filtered: FilteredLine[] = []\n    let emptyInput = input.length === 0\n    let lowInput = input.toLowerCase()\n    const scoreFn: FuzzyScorer = loose ? anyScore : fuzzyScoreGracefulAggressive\n    const wordPos = canSelectMany ? 4 : 0\n    for (let index = 0; index < items.length; index++) {\n      const item = items[index]","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/neoclide/coc.nvim/blob/50e974d9692461a69147d5cab146a8d3e439abe4/src/model/quickpick.ts#L182-L218","documentation":"QuickPick.show() first opens an input window, then calls coc#dialog#create_list to create the floating list window. When that Vim function returns a falsy result the list window was not created, so coc.nvim throws this error instead of returning a QuickPick with no window.","triggerScenarios":"Calling await quickPick.show() when coc#dialog#create_list returns null/0 — floating window creation fails (no float/popup support), invalid dimension from the input window, or the input window itself was closed/invalid before list creation.","commonSituations":"Using QuickPick API in Vim lacking +popupwin, screen too small with maxHeight constraints, or calling show() after the quickpick was disposed/window closed by an autocmd racing the creation.","solutions":["Verify Vim 8.2+/Neovim floating window support (:echo has('float') && has('popupwin'))","Ensure show() is called when the editor UI is attached and the buffer is visible","Wrap show() in try/catch and handle the failure (fallback to a plain list via window.showPickOption style API)","Check for autocmnds/plugins that close floating windows immediately after creation"],"exampleFix":"// before\nawait quickPick.show()\n// after\ntry {\n  await quickPick.show()\n} catch (e) {\n  window.showErrorMessage('QuickPick window could not be opened')\n}","handlingStrategy":"try-catch","validationCode":"if (!workspace.isReady) return\n// Vim: :echo has('float') && has('popupwin')","typeGuard":null,"tryCatchPattern":"try {\n  await quickPick.show()\n} catch (e) {\n  if (e.message.includes('Unable to open list window')) {\n    window.showErrorMessage('QuickPick unavailable in this environment')\n  }\n}","preventionTips":["Check floating window support before using QuickPick","Avoid closing/disposing the underlying input window while show() runs","Test in your target terminals (tmux, screen) before shipping"],"tags":["vim","floating-window","quickpick","ui"],"backgroundTag":"floating-window-unsupported","analyzedSha":"50e974d9692461a69147d5cab146a8d3e439abe4","analyzedAt":"2026-08-31T11:17:23.966Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}