diff options
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r-- | src/nvim/charset.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 8cae831881..48a38dd3d3 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1079,8 +1079,10 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, colnr_T *en } if (cursor != NULL) { - // cursor is after inserted text - vcol += cts.cts_cur_text_width; + if ((State & MODE_INSERT) == 0) { + // cursor is after inserted text + vcol += cts.cts_cur_text_width; + } if ((*ptr == TAB) && (State & MODE_NORMAL) && !wp->w_p_list |