From d677ae5f6461dcd78f08caec2c4fa72e6e275137 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 23 Aug 2018 04:43:44 -0400 Subject: vim-patch:8.0.1041: bogus characters when indenting during visual-block append Problem: Bogus characters appear when indenting kicks in while doing a visual-block append. Solution: Recompute when indenting is done. (Christian Brabandt) https://github.com/vim/vim/commit/e2e69e48134cbfdedea7802810932f8592705024 --- src/nvim/misc1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/nvim/misc1.c') diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 84d8c995a6..e87c754eb8 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -884,8 +884,7 @@ open_line ( && curbuf->b_p_lisp && curbuf->b_p_ai) { fixthisline(get_lisp_indent); - p = get_cursor_line_ptr(); - ai_col = (colnr_T)(skipwhite(p) - p); + ai_col = (colnr_T)getwhitecols_curline(); } /* * May do indenting after opening a new line. @@ -898,8 +897,7 @@ open_line ( ? KEY_OPEN_FORW : KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum))) { do_c_expr_indent(); - p = get_cursor_line_ptr(); - ai_col = (colnr_T)(skipwhite(p) - p); + ai_col = (colnr_T)getwhitecols_curline(); } if (vreplace_mode != 0) State = vreplace_mode; -- cgit