diff src/drawscreen.c @ 25487:c26ff3203b43 v8.2.3280

patch 8.2.3280: 'virtualedit' local to buffer is not the best solution Commit: https://github.com/vim/vim/commit/51ad850f5fbafa7aa3f60affa74ec9c9f992c6cc Author: Gary Johnson <garyjohn@spocom.com> Date: Tue Aug 3 18:33:08 2021 +0200 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 https://github.com/vim/vim/issues/8685)
author Bram Moolenaar <Bram@vim.org>
date Tue, 03 Aug 2021 18:45:04 +0200
parents ac88cd21ae88
children 637588377056
line wrap: on
line diff
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2006,15 +2006,15 @@ win_update(win_T *wp)
 	    {
 		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".