aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-07-22 20:11:13 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-07-23 02:11:13 +0200
commit765711e27237a5b0e22691bd12220a8557aab146 (patch)
tree93a4d65012114ab074e72a0026c67d0606d55d67 /src/nvim/charset.c
parent48c0e916a1224200eb95e08c2899b7b891dd53dc (diff)
downloadrneovim-765711e27237a5b0e22691bd12220a8557aab146.tar.gz
rneovim-765711e27237a5b0e22691bd12220a8557aab146.tar.bz2
rneovim-765711e27237a5b0e22691bd12220a8557aab146.zip
vim-patch:8.0.1765: CTRL-G j in Insert mode is incorrect when 'virtualedit' set (#8757)
Problem: CTRL-G j in Insert mode is incorrect when 'virtualedit' is set. Solution: Take coladd into account. (Christian Brabandt, closes vim/vim#2743) https://github.com/vim/vim/commit/db0eedec16621854c772760d02427804bc0a298d
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index a02d2a812d..231bff26e8 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1344,7 +1344,11 @@ colnr_T getvcol_nolist(pos_T *posp)
colnr_T vcol;
curwin->w_p_list = false;
- getvcol(curwin, posp, NULL, &vcol, NULL);
+ if (posp->coladd) {
+ getvvcol(curwin, posp, NULL, &vcol, NULL);
+ } else {
+ getvcol(curwin, posp, NULL, &vcol, NULL);
+ }
curwin->w_p_list = list_save;
return vcol;
}