aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-06 07:36:36 +0800
committerGitHub <noreply@github.com>2022-07-06 07:36:36 +0800
commit606af7887bfccba026b792191b55da15a1b575fc (patch)
tree949b73dc43f321055732257e7c37e999bcbea7f0 /src
parent41785b1b0cd8b54700110d0c83f599126b38a8c9 (diff)
downloadrneovim-606af7887bfccba026b792191b55da15a1b575fc.tar.gz
rneovim-606af7887bfccba026b792191b55da15a1b575fc.tar.bz2
rneovim-606af7887bfccba026b792191b55da15a1b575fc.zip
vim-patch:8.2.5162: reading before the start of the line with BS in Replace mode (#19241)
Problem: Reading before the start of the line with BS in Replace mode. Solution: Check the cursor column is more than zero. https://github.com/vim/vim/commit/0971c7a4e537ea120a6bb2195960be8d0815e97b
Diffstat (limited to 'src')
-rw-r--r--src/nvim/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index e3c80505c8..26422f06b1 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -8373,7 +8373,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p)
}
// delete characters until we are at or before want_vcol
- while (vcol > want_vcol
+ while (vcol > want_vcol && curwin->w_cursor.col > 0
&& (cc = *(get_cursor_pos_ptr() - 1), ascii_iswhite(cc))) {
ins_bs_one(&vcol);
}