Skip to content

Commit 0971c7a

Browse files
committed
patch 8.2.5162: reading before the start of the line with BS in Replace mode
Problem: Reading before the start of the line with BS in Replace mode. Solution: Check the cursor column is more than zero.
1 parent 8a3b805 commit 0971c7a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/edit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4183,7 +4183,7 @@ ins_bs(
41834183
#endif
41844184

41854185
// delete characters until we are at or before want_vcol
4186-
while (vcol > want_vcol
4186+
while (vcol > want_vcol && curwin->w_cursor.col > 0
41874187
&& (cc = *(ml_get_cursor() - 1), VIM_ISWHITE(cc)))
41884188
ins_bs_one(&vcol);
41894189

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ static char *(features[]) =
735735

736736
static int included_patches[] =
737737
{ /* Add new patch number below this line */
738+
/**/
739+
5162,
738740
/**/
739741
5161,
740742
/**/

0 commit comments

Comments
 (0)