0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Gary Johnson
2021-08-03 18:33:08 +02:00
committed by Bram Moolenaar
parent 2c70711e3f
commit 51ad850f5f
10 changed files with 56 additions and 37 deletions

View File

@@ -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".