Once 'timeoutlen' passes after a lone <C-w>, nvim runs its builtin window
command, which reads the next key without mappings, so the vscode window
mappings were skipped (e.g. <C-w>c closed the nvim window instead of the
editor).
Map a lone <C-w> to read the next key and feed the whole command again,
with its count, remapped when one of the window mappings handles it
(special keys like <C-w><C-Down> included).
Fixes#2466
* fix(cursor): keep the visual selection whole over characters outside the BMP
The inclusive Nvim end column was turned into an exclusive VSCode one by
adding a single UTF-16 unit. A character outside the BMP is two of them, so
the selection ended in the middle of a surrogate pair and drifted away from
where Nvim had the cursor: moving right over it took two presses and the
selected region no longer matched.
Step over the whole character instead, using its byte length.
Closes#2535
* test(cursor): add visual selection tests for non-BMP characters
* test(cursor): expect the astral pair to be whole in the mixed-character selection
---------
Co-authored-by: wongxy <xiyao.wong@foxmail.com>
The inclusive Nvim end column was turned into an exclusive VSCode one by
adding a single UTF-16 unit. A character outside the BMP is two of them, so
the selection ended in the middle of a surrogate pair and drifted away from
where Nvim had the cursor: moving right over it took two presses and the
selected region no longer matched.
Step over the whole character instead, using its byte length.
Closes#2535