diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/charset.c | 6 | ||||
-rw-r--r-- | src/nvim/drawline.c | 2 |
2 files changed, 5 insertions, 3 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 diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index ed22f71239..e42d912dbe 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -1824,7 +1824,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool nochange, wlv.c_extra = NUL; wlv.c_final = NUL; wlv.extra_attr = vtc.hl_id ? syn_id2attr(vtc.hl_id) : 0; - n_attr = wlv.n_extra; + n_attr = mb_charlen(vtc.text); extmark_attr = 0; virt_inline_i++; } |