{"version":"2.1.235","anchor":"vim-mode-and-cursor-position-moved-into-a-shared-store-and","canonical_anchor":"vim-mode-and-cursor-position-moved-into-a-shared-store-and","heading":"Vim mode and cursor position moved into a shared store, and the cursor is restored across renders","tier":"internal","area":"Elsewhere","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.235\/e\/vim-mode-and-cursor-position-moved-into-a-shared-store-and","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.235","markdown":"### Vim mode and cursor position moved into a shared store, and the cursor is restored across renders\n\nVim mode and cursor position now live in a shared store, restoring cursor position across renders\n\nA new module-level store holds `vimMode` and `savedCursorOffset`, initialized to `vimMode: \"INSERT\"` and `savedCursorOffset: null`. The input component seeds its cursor from the saved offset, saves it back on unmount, and re-clamps it in NORMAL mode using NFC-normalized text. Vim mode is forced back to INSERT whenever vim mode is disabled.\n\nReturning from an external editor also re-clamps the cursor when in NORMAL mode.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}