summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-02 20:30:35 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-02 20:30:35 +0200
commite2e69e48134cbfdedea7802810932f8592705024 (patch)
tree5de70fd649143a4e94584ef3a648b1877900b02f /src/edit.c
parent3653822546fb0f1005c32bb5b70dc9bfacdfc954 (diff)
downloadvim-e2e69e48134cbfdedea7802810932f8592705024.zip
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)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/edit.c b/src/edit.c
index 33c4c0071..6fd124539 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -5182,7 +5182,7 @@ ins_complete(int c, int enable_pum)
* first non_blank in the line, if it is not a wordchar
* include it to get a better pattern, but then we don't
* want the "\\<" prefix, check it bellow */
- compl_col = (colnr_T)(skipwhite(line) - line);
+ compl_col = (colnr_T)getwhitecols(line);
compl_startpos.col = compl_col;
compl_startpos.lnum = curwin->w_cursor.lnum;
compl_cont_status &= ~CONT_SOL; /* clear SOL if present */
@@ -5348,7 +5348,7 @@ ins_complete(int c, int enable_pum)
}
else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
{
- compl_col = (colnr_T)(skipwhite(line) - line);
+ compl_col = (colnr_T)getwhitecols(line);
compl_length = (int)curs_col - (int)compl_col;
if (compl_length < 0) /* cursor in indent: empty pattern */
compl_length = 0;
@@ -8208,8 +8208,7 @@ in_cinkeys(
{
/* "0=word": Check if there are only blanks before the
* word. */
- line = ml_get_curline();
- if ((int)(skipwhite(line) - line) !=
+ if (getwhitecols(line) !=
(int)(curwin->w_cursor.col - (p - look)))
match = FALSE;
}