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

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)
This commit is contained in:
Gary Johnson
2021-07-26 22:19:10 +02:00
committed by Bram Moolenaar
parent 29b857150c
commit 53ba05b090
17 changed files with 220 additions and 41 deletions

View File

@@ -2006,21 +2006,21 @@ win_update(win_T *wp)
{
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 =