patch 8.2.3280: 'virtualedit' local to buffer is not the best solution
Problem: 'virtualedit' local to buffer is not the best solution.
Solution: Make it window-local. (Gary Johnson, closes #8685)
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 36aad63..82e5375 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2006,15 +2006,15 @@
{
colnr_T fromc, toc;
#if defined(FEAT_LINEBREAK)
- int save_ve_flags = curbuf->b_ve_flags;
+ int save_ve_flags = curwin->w_ve_flags;
if (curwin->w_p_lbr)
- curbuf->b_ve_flags = VE_ALL;
+ curwin->w_ve_flags = VE_ALL;
#endif
getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
++toc;
#if defined(FEAT_LINEBREAK)
- curbuf->b_ve_flags = save_ve_flags;
+ curwin->w_ve_flags = save_ve_flags;
#endif
// Highlight to the end of the line, unless 'virtualedit' has
// "block".