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)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index bb0d887..77a8a7b 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2007,7 +2007,9 @@
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