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:
committed by
Bram Moolenaar
parent
29b857150c
commit
53ba05b090
@@ -5757,7 +5757,7 @@ n_start_visual_mode(int c)
|
||||
|
||||
// Corner case: the 0 position in a tab may change when going into
|
||||
// virtualedit. Recalculate curwin->w_cursor to avoid bad highlighting.
|
||||
if (c == Ctrl_V && (ve_flags & VE_BLOCK) && gchar_cursor() == TAB)
|
||||
if (c == Ctrl_V && (get_ve_flags() & VE_BLOCK) && gchar_cursor() == TAB)
|
||||
{
|
||||
validate_virtcol();
|
||||
coladvance(curwin->w_virtcol);
|
||||
@@ -6780,7 +6780,7 @@ adjust_cursor(oparg_T *oap)
|
||||
// - 'virtualedit' is not "all" and not "onemore".
|
||||
if (curwin->w_cursor.col > 0 && gchar_cursor() == NUL
|
||||
&& (!VIsual_active || *p_sel == 'o')
|
||||
&& !virtual_active() && (ve_flags & VE_ONEMORE) == 0)
|
||||
&& !virtual_active() && (get_ve_flags() & VE_ONEMORE) == 0)
|
||||
{
|
||||
--curwin->w_cursor.col;
|
||||
// prevent cursor from moving on the trail byte
|
||||
@@ -7014,7 +7014,7 @@ nv_esc(cmdarg_T *cap)
|
||||
set_cursor_for_append_to_line(void)
|
||||
{
|
||||
curwin->w_set_curswant = TRUE;
|
||||
if (ve_flags == VE_ALL)
|
||||
if (get_ve_flags() == VE_ALL)
|
||||
{
|
||||
int save_State = State;
|
||||
|
||||
|
Reference in New Issue
Block a user