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)
diff --git a/src/charset.c b/src/charset.c
index 7da18bb..e6657ce 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1417,7 +1417,12 @@
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;
}