Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Undo broken with new VS Code

Open marchbox opened this issue 3 years ago • 161 comments

Type: Bug

I just upgraded to VS Code 1.74.0 today, and started noticing an issue with undo command ("u") in Vim. It appears to only go back 2-3 iterations (my current Vim: History setting is "50"). And if I hit CTRL+Z, it first undoes what "u" just undid, then start actually undoing, e.g.

  • i → insert mode
  • a → "a"
  • b → "ab"
  • ESC → normal mode
  • u → "a"
  • u → nothing happens, but should've undone "a"
  • CTRL-Z → "ab" (undoes what u just undid)
  • CTRL-Z → "a"
  • CTRL-Z → ""

Here is my VS Code info: Version: 1.74.0 (Universal) Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91 Date: 2022-12-05T16:43:37.594Z (2 days ago) Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 21.6.0 Sandboxed: No

Extension version: 1.24.3 VS Code version: Code 1.74.0 (Universal) (5235c6bb189b60b01b1f49062f4ffa42384f8c91, 2022-12-05T16:43:37.594Z) OS version: Darwin arm64 21.6.0 Modes: Sandboxed: No

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 2, 2
Memory (System) 64.00GB (32.10GB free)
Process Argv --crash-reporter-id 934e8b32-9713-4d8f-957f-354420e03177
Screen Reader yes
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
pyindex848:30577860
nodejswelcome1:30587005
2e4cg342:30602488
gswce1:30612156
iaj6b796:30613358
dbltrim-noruby:30604474
89544117:30613380
fim-prod:30623723
ejf25101:30620729

marchbox avatar Dec 08 '22 00:12 marchbox

I'm having this same problem ... I'm using VS Code 1.74.0-insider. I'm using Ubuntu, so I don't think this is OS related.

weiying-chen avatar Dec 09 '22 05:12 weiying-chen

Same here

Saul-Mirone avatar Dec 13 '22 02:12 Saul-Mirone

Same here

Elia-Darwish avatar Dec 13 '22 07:12 Elia-Darwish

saaame

magdyamr542 avatar Dec 14 '22 13:12 magdyamr542

Same here.

visortelle avatar Dec 15 '22 12:12 visortelle

this. same here

ghost avatar Dec 16 '22 09:12 ghost

Queuing myself into the list of people experiencing this issue 👀

Niwilai avatar Dec 16 '22 12:12 Niwilai

Same here.

  • VS Code 1.74.0
  • Ubuntu 22.04
  • vscodevim 1.24.3

deedeedev avatar Dec 16 '22 20:12 deedeedev

Same here.

vscodevim v1.24.3 Version: 1.74.1 (user setup) Commit: 1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a Date: 2022-12-14T10:30:51.966Z Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: Yes

heirenton avatar Dec 20 '22 07:12 heirenton

I'm seeing the same here on Ubuntu.

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy

vscodevim v1.24.3 Version: 1.74.1 Commit: 1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a Date: 2022-12-14T10:35:03.979Z Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Linux x64 5.15.0-56-generic Sandboxed: Yes

paulburlumi avatar Dec 20 '22 17:12 paulburlumi

Same issue... tried

    {
      "before": ["u"],
      "commands": ["undo"]
    },
    {
      "before": ["r"],
      "commands": ["redo"]
    }

with no luck

sethawright avatar Dec 21 '22 15:12 sethawright

Same here

Versión: 1.74.2 Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161 Fecha: 2022-12-20T10:32:21.587Z Electrón: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 22.2.0 En espacio aislado: No

francescarpi avatar Dec 22 '22 07:12 francescarpi

Same here.

ingemar avatar Dec 23 '22 08:12 ingemar

Same here.

masa-08 avatar Dec 26 '22 10:12 masa-08

I'm a bit confused... iab<Esc>u should undo the entire insertion ("ab", not just "a"), which is what I'm seeing, at least on VS Code 1.74.2.

If anyone is still experiencing this, please post settings.

J-Fields avatar Dec 27 '22 21:12 J-Fields

I'm a bit confused... iab<Esc>u should undo the entire insertion ("ab", not just "a"), which is what I'm seeing, at least on VS Code 1.74.2.

If anyone is still experiencing this, please post settings.

I don't think this is the case being described. The issue seems to appear if you save the file.

o1<Esc>:w<Enter>o2<Esc>uu will only undo the "2".

renthog avatar Dec 29 '22 16:12 renthog

It seems this issue is fixed now, at least in my VS Code 1.74.2.

Version: 1.74.2 (Universal) Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161 Date: 2022-12-20T10:26:09.430Z Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 22.3.0 Sandboxed: No

marchbox avatar Dec 31 '22 08:12 marchbox

It seems this issue is fixed now, at least in my VS Code 1.74.2.

Version: 1.74.2 (Universal) Commit: e8a3071ea4344d9d48ef8a4df2c097372b0c5161 Date: 2022-12-20T10:26:09.430Z Electron: 19.1.8 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 22.3.0 Sandboxed: No

@marchbox are you able to undo changes with "u" after saving a file? I can still reproduce that issue with 1.74.2. which may be related to this. The last version where that worked for me is 1.72.2, see #8188.

slnc avatar Dec 31 '22 09:12 slnc

It seems this issue is fixed now, at least in my VS Code 1.74.2.

It still doesn't work in my VS Code 1.74.2.

visortelle avatar Dec 31 '22 09:12 visortelle

@slnc @visortelle yeah I was able to undo after saving (both with :w and CMD+S)

marchbox avatar Dec 31 '22 20:12 marchbox