monaco-vim icon indicating copy to clipboard operation
monaco-vim copied to clipboard

Replace mode doesn't handle spaces properly

Open spectral54 opened this issue 2 years ago • 0 comments

After entering replace mode (Shift+R), pressing space in vim overwrites the character under the cursor with a space. In monaco-vim, it inserts a space, making the line one character longer.

This also causes backspace to misbehave; backspace doesn't remove the space, so if I have the text:

aaaa

and I position the cursor over the second character and type b, space, b, I have:

ab ba
    ^ cursor on the final a, line is now 5 characters long instead of 4

and I then hit backspace three or more times, I'm left with:

abaaa
  ^  cursor is here, _after_ the b. 

Note that the backspace correctly brought back the two 'a's that I overwrote, but doesn't let me undo the first 'b' that I used to overwrite.

spectral54 avatar Jul 20 '23 22:07 spectral54