diff src/spell.c @ 12323:4dba3e4f3b01 v8.0.1041

patch 8.0.1041: bogus characters when indenting during visual-block append commit https://github.com/vim/vim/commit/e2e69e48134cbfdedea7802810932f8592705024 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 2 20:30:35 2017 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Sep 2017 20:45:04 +0200
parents 578df034735d
children 68d7bc045dbe
line wrap: on
line diff
--- a/src/spell.c
+++ b/src/spell.c
@@ -1625,11 +1625,11 @@ spell_move_to(
 
 	/* For checking first word with a capital skip white space. */
 	if (capcol == 0)
-	    capcol = (int)(skipwhite(line) - line);
+	    capcol = getwhitecols(line);
 	else if (curline && wp == curwin)
 	{
 	    /* For spellbadword(): check if first word needs a capital. */
-	    col = (int)(skipwhite(line) - line);
+	    col = getwhitecols(line);
 	    if (check_need_cap(lnum, col))
 		capcol = col;
 
@@ -3593,7 +3593,7 @@ check_need_cap(linenr_T lnum, colnr_T co
 
     line = ml_get_curline();
     endcol = 0;
-    if ((int)(skipwhite(line) - line) >= (int)col)
+    if (getwhitecols(line) >= (int)col)
     {
 	/* At start of line, check if previous line is empty or sentence
 	 * ends there. */