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).
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.
|
inoremap <expr> <C-B> getline('.')=~'^\s*$'&&col('.')>strlen(getline('.'))?"0\<Lt>C-D>\<Lt>Esc>kJs":"\<Lt>Left>" |
As a side note, why is
0<C-d> run? I thought
J already removed the indentation.
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 justba|(the|represents the cursor, rather than any character).Looking at the code, I believe that the culprit is the
sat the end, and I think that replacing it with anawill fix the issue.vim-rsi/plugin/rsi.vim
Line 21 in 4554063
As a side note, why is
0<C-d>run? I thoughtJalready removed the indentation.