Repository navigation
Description
- VSCode Version:
- OS Version:
Steps to Reproduce:
Issue Type: Bug
The VSCodeVim extension has some keybindings that make use of the 'when' expressions. The 'Ctrl' based keybindings use a 'when' expression similar to this (for the "Ctrl+r" for example):
editorTextFocus && vim.active && vim.use<C-r>However, vscode is automatically changing these expressions to the following:
editorTextFocus && vim.active && vim.use<C-r >Notice the ' ' (space) between 'r' and '>'. If I try to manually edit the when expression and remove that space, vscode automatically inserts that space again, however it still changes the 'source' to 'User'. There is no way to remove that space.
This means that all keybindings that use this no longer work.
VS Code version: Code - Insiders 1.52.0-insider (5e350b1, 2020-12-04T10:15:27.849Z)
OS version: Windows_NT x64 10.0.19041
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2592) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.90GB (2.40GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (1)
| Extension | Author (truncated) | Version |
|---|---|---|
| vim | vsc | 1.17.2 |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
openlogontheside:30221882
python763:30178808
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
python504:30227505
vswsl492cf:30208930
wsl2prompt:30219162
vstry244:30230484
pythonvsdeb440:30224570
unusedpromptcf:30219165
folderexplorercf:30219167
openfilemenucf:30219169
pythonvsded773:30223139
pythonvspyt859:30228413
Does this issue occur when all extensions are disabled?: (it creates an issue to an extension)
Activity
[-]When expressions insert <space> before a '>' character automatically[/-][+]'When' expressions insert <space> before a '>' character automatically[/+]berknam commentedon Dec 4, 2020
Alexandru Dima (@alexdima) I believe this is related to the following commits:
72defdc
16ffa1d
bbdbcd3
I have also noticed that if I manually change the expression to this:
editorTextFocus && vim.active && vim.use<C-r> == trueThen vscode correctly updates it to this:
And the key works after this.
Is it possible to implement some kind of check before assuming that it is a "greaterThan" or "smallerThan" expression? For example if both sides of the symbol are not numbers then it makes no sense to compare them?!
I guess we can fix this on VSCodeVim side. But this is bound to happen to someone else, so maybe it's better to fix on the source...
gjsjohnmurray commentedon Dec 4, 2020
I think #110846 may have caused this.