You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue occur when all extensions are disabled?: No, it's a bug with the extension API itself
VS Code Version: 1.135.0-insider (Universal)
OS Version: Darwin arm64 25.4.0
Hello, I'm reporting a bug I've noticed where calling cancelSelection interferes with extensions that register the "type" command. Normally extensions can register "type" to intercept all inputs:
This is useful for Vim-style extensions which want to override regular typed letters like "a", "b", "c". Typing those letters are instead intercepted by the onType listener, and don't actually type letters.
However, I noticed that when I trigger a "cancelSelection" command, the next typed letter will actually get typed, somehow bypassing the "type" register command:
Screen.Recording.2026-08-18.at.4.21.42.PM.mp4
In the above recording I have a "type" command registered, configured so that typing the letter "a" will trigger the "cancelSelection" command, and typing the letter "j" will trigger the "cursorDown" command.
When I press "j" I would expect the cursor to move down one row.
Instead, when I press "j" it removes most of the section I had previously highlighted, only keeping a couple letters. Then it adds "jj".
Some extra information:
This issue began occurring sometime between 2026-01-01 and 2026-04-23 on stable
My extension I used to reproduce this (bmalehorn.vimspired) hasn't been updated in 3 years, so it's not a change in the extension. You can view the extension source here
It's possible this is a regression in the extension API, and I'd be fine with a workaround my extension can use
Canceling selection by pressing Escape does not reproduce the issue (so, what's the difference between Escape and cancelSelection?)
This doesn't occur on reverse selection (selecting from right to left)
This doesn't occur on multiline selections
The amount of text remaining (above, only 1 character remained) is not consistently 1 character, it's a variable amount between 0 and the whole line
Different keys (a, j) and different commands (cursorDown) still reproduce the issue
Expected: the cursor moves down 1 row, no text is modified.
Actual: the previously-highlighted portion is partially deleted and "jj" is added to the end.
Does this issue occur when all extensions are disabled?: No, it's a bug with the extension API itself
Hello, I'm reporting a bug I've noticed where calling
cancelSelectioninterferes with extensions that register the"type"command. Normally extensions can register"type"to intercept all inputs:This is useful for Vim-style extensions which want to override regular typed letters like "a", "b", "c". Typing those letters are instead intercepted by the
onTypelistener, and don't actually type letters.However, I noticed that when I trigger a
"cancelSelection"command, the next typed letter will actually get typed, somehow bypassing the"type"register command:Screen.Recording.2026-08-18.at.4.21.42.PM.mp4
In the above recording I have a
"type"command registered, configured so that typing the letter "a" will trigger the"cancelSelection"command, and typing the letter "j" will trigger the"cursorDown"command.When I press "j" I would expect the cursor to move down one row.
Instead, when I press "j" it removes most of the section I had previously highlighted, only keeping a couple letters. Then it adds "jj".
Some extra information:
bmalehorn.vimspired) hasn't been updated in 3 years, so it's not a change in the extension. You can view the extension source herecancelSelection?)Steps to Reproduce:
bmalehorn.vimspired{ "vimspired.keybindings": { "a": "cancelSelection", "j": "cursorDown", }, }Expected: the cursor moves down 1 row, no text is modified.
Actual: the previously-highlighted portion is partially deleted and "jj" is added to the end.