aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index d21583e951..26422f06b1 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -7330,7 +7330,7 @@ static void replace_do_bs(int limit_col)
}
/// Check that C-indenting is on.
-static bool cindent_on(void)
+bool cindent_on(void)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
return !p_paste && (curbuf->b_p_cin || *curbuf->b_p_inde != NUL);
@@ -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);
}