summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-03 15:08:37 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-03 15:08:37 +0200
commit9cee4a1c9c69542ccd73bcd2db05920150856361 (patch)
tree477751fae2e8cf0c5afc977127d1622fdef0e105 /src/drawscreen.c
parentfcde67c99fbb6d7294e01b9e87d8d2ae7af31255 (diff)
patch 8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrongv8.2.3088
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)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index bb0d8878e8..77a8a7b276 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -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