{"version":"2.1.292","anchor":"autocomplete-suggestion-list-can-keep-its-scroll-window","canonical_anchor":"autocomplete-suggestion-list-can-keep-its-scroll-window","heading":"Prompt input: cursor parking, Vim normal-mode fixes and steadier suggestions","tier":"notice","area":"Prompt Input","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.292\/e\/autocomplete-suggestion-list-can-keep-its-scroll-window","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.292","markdown":"### Prompt input: cursor parking, Vim normal-mode fixes and steadier suggestions\n\nThe prompt box gets cursor parking, Vim normal-mode end-of-line fixes, an arrowed suggestion that Enter respects, and a suggestion list that scrolls less\n\n**Unclear.** Which suggestion lists use the steadier scrolling is not clear.\n\n**What**\n\nThe box where you type prompts gets several cursor and suggestion fixes. Suggestions are the list of commands that pops up as you type, such as slash commands.\n\n- `parkCursor`: a new prop on the text input. The cursor is drawn only when `parkCursor` is not false; before, it was drawn whenever the input had focus and `showCursor` was set. The prompt composer sets it to true when `cursorRowId` is null.\n\n- `forgetColumnRef`: passed to the Vim editor so it can forget the remembered cursor column. Clicking the input now clears the remembered column.\n\n- Vim NORMAL mode: when the cursor sits on the last character of a line, inserted text first moves the cursor to the line end and then re-clamps it. Before, text was inserted at the raw cursor position.\n\n- `arrowedSuggestionId`: the suggestion you moved to with the arrow keys is now remembered. With the feature turned on, Enter on a slash-command suggestion runs only the arrowed or matching suggestion. Before, Enter always ran the selected command suggestion.\n\n- A new suggestion controller handles Tab, moving, clicking and dropping, and navigation uses shared helpers. This sits behind a feature check.\n\n- `keepWindow`: the suggestion list can keep its visible window steady instead of recentering, and it now windows items around the selected index. Before, the window was recomputed around the selection on every redraw.\n\n- `cursorRowId` and `inputTakesFocus` are new props, and the suggestions store is split into `drawn` and `own`.\n\n**Why**\n\nVim users should see the cursor land in the right place when typing at the end of a line, the suggestion list should jump around less while scrolling, and Enter should run the suggestion you actually arrowed to once that behaviour is switched on.\n\n- Area: Prompt Input\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}