mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
vim-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 vim/vim#8495)
9cee4a1c9c
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user