1
0
forked from aniani/vim

patch 8.0.1765: CTRL-G j in Insert mode is incorrect when 'virtualedit' set

Problem:    CTRL-G j in Insert mode is incorrect when 'virtualedit' is set.
Solution:   Take coladd into account. (Christian Brabandt, closes #2743)
This commit is contained in:
Bram Moolenaar
2018-04-25 22:38:17 +02:00
parent 856905bd83
commit db0eedec16
3 changed files with 26 additions and 1 deletions

View File

@@ -1417,7 +1417,12 @@ getvcol_nolist(pos_T *posp)
colnr_T vcol;
curwin->w_p_list = FALSE;
getvcol(curwin, posp, NULL, &vcol, NULL);
#ifdef FEAT_VIRTUALEDIT
if (posp->coladd)
getvvcol(curwin, posp, NULL, &vcol, NULL);
else
#endif
getvcol(curwin, posp, NULL, &vcol, NULL);
curwin->w_p_list = list_save;
return vcol;
}