bug: Visual mode behaves incorrectly for unicode characters not in the basic multilingual plane
Check the following:
- I have tried setting
vscode-neovim.neovimCleanin VSCode settings and restarting VSCode. - I have read the vscode-neovim docs.
- I have searched existing (closed!) issues.
Neovim version (nvim -v)
0.11.3
Operating system/version
Linux Mint 22.1 Cinnamon (but issue also occurs on Windows 11)
Problem (including log messages)
I was writing some Lean code, and I noticed that when I entered visual mode and moved my cursor over text containing a character like , the cursor in vscode would be desynchronized from the cursor in neovim (or at least it appeared that way), so the selection would behave weirdly. Interestingly, this only seemed to happen for some unicode characters, and others, like ℕ, behaved fine.
As far as I can tell, it seems to work fine for characters in the basic multilingual plane (codepoints up to U+FFFF) but everything past that behaves poorly. For example, visual mode works fine for ○ (U+FFEE) but not for (U+10000).
2025-08-31 13:14:24.967 [info] MainController: Starting nvim: /opt/nvim/nvim -N --embed --cmd source /home/niels/.vscode-oss/extensions/asvetliakov.vscode-neovim-1.18.24-universal/runtime/vscode-neovim.vim --clean
2025-08-31 13:14:25.033 [info] MainController: Nvim info: {
nvimVersion: {
api_prerelease: false,
major: 0,
minor: 11,
patch: 3,
prerelease: false,
build: 'gb2684d9f66',
api_compatible: 0,
api_level: 13
},
logFile: '/home/niels/.local/state/nvim/log',
configDir: '/home/niels/.config/nvim'
}2025-08-31 13:19:27.850 [debug] MainController: Find nvim result: {
matches: [
{
nvimVersion: '0.11.3',
path: '/opt/nvim/nvim',
buildType: 'Release',
luaJitVersion: '2.1.1741730670'
}
],
invalid: []
}
2025-08-31 13:19:27.850 [info] MainController: Starting nvim: /opt/nvim/nvim -N --embed --cmd source /home/niels/.vscode-oss/extensions/asvetliakov.vscode-neovim-1.18.24-universal/runtime/vscode-neovim.vim --clean
2025-08-31 13:19:27.850 [debug] MainController: Attaching to neovim
2025-08-31 13:19:27.850 [debug] MainController: Setting client info: vscode-neovim 1.18.24
2025-08-31 13:19:27.850 [debug] MainController: Setting current dir to: /home/niels/Documents/Scratch/vscode-test
2025-08-31 13:19:27.878 [debug] MainController: UIAttach
2025-08-31 13:19:27.881 [debug] BufferManager: force syncing layout
2025-08-31 13:19:27.907 [debug] BufferManager: Attaching new external buffer: '', id: 1
2025-08-31 13:19:27.907 [debug] BufferManager: 1 is the first neovim buffer, skipping
2025-08-31 13:19:27.910 [debug] ModeManager: Changing mode to n
2025-08-31 13:19:27.910 [debug] ModeManager: Setting mode context to normal
2025-08-31 13:19:27.931 [info] MainController: Nvim info: {
nvimVersion: {
build: 'gb2684d9f66',
minor: 11,
api_prerelease: false,
prerelease: false,
api_level: 13,
major: 0,
api_compatible: 0,
patch: 3
},
logFile: '/home/niels/.local/state/nvim/log',
configDir: '/home/niels/.config/nvim'
}
2025-08-31 13:19:27.932 [debug] MainController: Init completed
2025-08-31 13:19:27.984 [debug] BufferManager: Visible editor, viewColumn: 1, doc: file:///home/niels/Documents/Scratch/vscode-test/test.txt
2025-08-31 13:19:27.984 [debug] BufferManager: Document not known, init in neovim
2025-08-31 13:19:27.985 [debug] BufferManager: Init buffer for 2, doc: file:///home/niels/Documents/Scratch/vscode-test/test.txt
2025-08-31 13:19:27.992 [debug] DocumentChangeManager: Init buffer content for bufId: 2, uri: file:///home/niels/Documents/Scratch/vscode-test/test.txt, version: 1
2025-08-31 13:19:27.992 [debug] BufferManager: Document: file:///home/niels/Documents/Scratch/vscode-test/test.txt, BufId: 2
2025-08-31 13:19:27.992 [debug] BufferManager: Creating new window for 1 column (undefined is OK here)
2025-08-31 13:19:27.998 [debug] BufferManager: Created new window: 1002 ViewColumn: 1
2025-08-31 13:19:28.113 [debug] BufferManager: Setting active editor - winId: 1002
2025-08-31 13:19:28.215 [debug] BufferManager: window changed, target window id: 1002
2025-08-31 13:19:30.112 [debug] ModeManager: Changing mode to v
2025-08-31 13:19:30.112 [debug] ModeManager: Setting mode context to visual
2025-08-31 13:19:30.184 [debug] ModeManager: Changing mode to n
2025-08-31 13:19:30.184 [debug] ModeManager: Setting mode context to normal
2025-08-31 13:19:33.464 [debug] ModeManager: Changing mode to v
2025-08-31 13:19:33.465 [debug] ModeManager: Setting mode context to visual
2025-08-31 13:19:33.536 [debug] ModeManager: Changing mode to n
2025-08-31 13:19:33.536 [debug] ModeManager: Setting mode context to normal
2025-08-31 13:19:36.424 [debug] ModeManager: Changing mode to v
2025-08-31 13:19:36.424 [debug] ModeManager: Setting mode context to visual
2025-08-31 13:19:40.187 [debug] TypingManager: Send for: <Esc>
2025-08-31 13:19:40.188 [debug] ModeManager: Changing mode to n
2025-08-31 13:19:40.188 [debug] ModeManager: Setting mode context to normalSteps To Reproduce
- Open a new file
- Enter the following text: Using the character to test
- Press 0 to go to the start of the line, then v to enter visual mode
- Hold down l to move to the right, noting how when the cursor goes past it stops working properly
Expected Behavior
The white box cursor only takes a single press of l to move to the right, as opposed to two presses, and it stays in sync with the actual selection.
Source: vscode-neovim/vscode-neovim