patch 8.2.3227: 'virtualedit' can only be set globally
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closes #8638)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 49615bd..36aad63 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2006,21 +2006,21 @@
{
colnr_T fromc, toc;
#if defined(FEAT_LINEBREAK)
- int save_ve_flags = ve_flags;
+ int save_ve_flags = curbuf->b_ve_flags;
if (curwin->w_p_lbr)
- ve_flags = VE_ALL;
+ curbuf->b_ve_flags = VE_ALL;
#endif
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
++toc;
#if defined(FEAT_LINEBREAK)
- ve_flags = save_ve_flags;
+ curbuf->b_ve_flags = save_ve_flags;
#endif
// Highlight to the end of the line, unless 'virtualedit' has
// "block".
if (curwin->w_curswant == MAXCOL)
{
- if (ve_flags & VE_BLOCK)
+ if (get_ve_flags() & VE_BLOCK)
{
pos_T pos;
int cursor_above =