diff options
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 3446a944cd..cab41d1783 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -1186,9 +1186,12 @@ static void win_update(win_T *wp, Providers *providers) getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc); ve_flags = save_ve_flags; - ++toc; - if (curwin->w_curswant == MAXCOL) + toc++; + // Highlight to the end of the line, unless 'virtualedit' has + // "block". + if (curwin->w_curswant == MAXCOL && !(ve_flags & VE_BLOCK)) { toc = MAXCOL; + } if (fromc != wp->w_old_cursor_fcol || toc != wp->w_old_cursor_lcol) { |