comparison 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
comparison
equal deleted inserted replaced
25486:9ca6ec7da094 25487:c26ff3203b43
2004 // First compute the actual start and end column. 2004 // First compute the actual start and end column.
2005 if (VIsual_mode == Ctrl_V) 2005 if (VIsual_mode == Ctrl_V)
2006 { 2006 {
2007 colnr_T fromc, toc; 2007 colnr_T fromc, toc;
2008 #if defined(FEAT_LINEBREAK) 2008 #if defined(FEAT_LINEBREAK)
2009 int save_ve_flags = curbuf->b_ve_flags; 2009 int save_ve_flags = curwin->w_ve_flags;
2010 2010
2011 if (curwin->w_p_lbr) 2011 if (curwin->w_p_lbr)
2012 curbuf->b_ve_flags = VE_ALL; 2012 curwin->w_ve_flags = VE_ALL;
2013 #endif 2013 #endif
2014 getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc); 2014 getvcols(wp, &VIsual, &curwin->w_cursor, &fromc, &toc);
2015 ++toc; 2015 ++toc;
2016 #if defined(FEAT_LINEBREAK) 2016 #if defined(FEAT_LINEBREAK)
2017 curbuf->b_ve_flags = save_ve_flags; 2017 curwin->w_ve_flags = save_ve_flags;
2018 #endif 2018 #endif
2019 // Highlight to the end of the line, unless 'virtualedit' has 2019 // Highlight to the end of the line, unless 'virtualedit' has
2020 // "block". 2020 // "block".
2021 if (curwin->w_curswant == MAXCOL) 2021 if (curwin->w_curswant == MAXCOL)
2022 { 2022 {