0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrong

Problem:    With 'virtualedit' set to "block" Visual highlight is wrong after
            using "$".  (Marco Trosi)
Solution:   Do not set w_old_cursor_lcol to MAXCOL. (closes #8495)
This commit is contained in:
Bram Moolenaar
2021-07-03 15:08:37 +02:00
parent fcde67c99f
commit 9cee4a1c9c
4 changed files with 34 additions and 1 deletions

View File

@@ -2007,7 +2007,9 @@ win_update(win_T *wp)
ve_flags = save_ve_flags;
#endif
++toc;
if (curwin->w_curswant == MAXCOL)
// 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