diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-02 20:30:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-02 20:30:35 +0200 |
commit | e2e69e48134cbfdedea7802810932f8592705024 (patch) | |
tree | 5de70fd649143a4e94584ef3a648b1877900b02f /src/misc1.c | |
parent | 3653822546fb0f1005c32bb5b70dc9bfacdfc954 (diff) | |
download | vim-git-e2e69e48134cbfdedea7802810932f8592705024.tar.gz |
patch 8.0.1041: bogus characters when indenting during visual-block appendv8.0.1041
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/misc1.c')
-rw-r--r-- | src/misc1.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c index abc455e95..8ae75e6d8 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1589,8 +1589,7 @@ open_line( && curbuf->b_p_ai) { fixthisline(get_lisp_indent); - p = ml_get_curline(); - ai_col = (colnr_T)(skipwhite(p) - p); + ai_col = (colnr_T)getwhitecols_curline(); } #endif #ifdef FEAT_CINDENT @@ -1608,8 +1607,7 @@ open_line( : KEY_OPEN_BACK, ' ', linewhite(curwin->w_cursor.lnum))) { do_c_expr_indent(); - p = ml_get_curline(); - ai_col = (colnr_T)(skipwhite(p) - p); + ai_col = (colnr_T)getwhitecols_curline(); } #endif #if defined(FEAT_VREPLACE) && (defined(FEAT_LISP) || defined(FEAT_CINDENT)) |