Commit Graph
7 Commits
Author SHA1 Message Date
upstream 6e63acc87e Upstream vscode-neovim/vscode-neovim state of the touched files before bdac2a3e1d 2026-10-03 02:24:35 +02:00
dualfrozandwongxy 5cc37c9f0a fix(cursor): keep the visual selection whole over characters outside the BMP (#2683)
* 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>
2026-09-23 18:39:53 +08:00
upstream aacc554f30 Upstream vscode-neovim/vscode-neovim state of the touched files before 594cab76b1 2026-09-23 12:39:53 +02:00
dualfroz b87849804c test(cursor): expect the astral pair to be whole in the mixed-character selection 2026-09-23 06:25:40 +02:00
upstream 008cac1096 Upstream vscode-neovim/vscode-neovim state of the touched files before e9738b53f2 2026-09-23 06:25:40 +02:00
dualfroz aa086f6b53 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
2026-09-13 15:30:08 +02:00
upstream c0394e311c Upstream vscode-neovim/vscode-neovim state of the touched files before 6a6303a21d 2026-09-11 23:53:04 +02:00