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

`<C-b>` on blank line also deletes last character of previous line

Open MithicSpirit opened this issue 1 year ago • 0 comments

Doing <C-b> on a blank line (either empty or at the end of one with only whitespace) causes the line to be deleted (expected) and the last character of the previous line to be deleted as well (unexpected). For example, in the following code, pressing <C-b> results in just ba| (the | represents the cursor, rather than any character).

bar
|

Looking at the code, I believe that the culprit is the s at the end, and I think that replacing it with an a will fix the issue. https://github.com/tpope/vim-rsi/blob/45540637ead22f011e8215f1c90142e49d946a54/plugin/rsi.vim#L21 As a side note, why is 0<C-d> run? I thought J already removed the indentation.

MithicSpirit avatar Apr 23 '24 17:04 MithicSpirit