diff options
author | Gary Johnson <garyjohn@spocom.com> | 2021-07-26 22:19:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-26 22:19:10 +0200 |
commit | 53ba05b09075f14227f9be831a22ed16f7cc26b2 (patch) | |
tree | 75d5ddb38aa9702416d73b7a7b8f158f1d0c320a /src/edit.c | |
parent | 29b857150c111a455f1a38a8f748243524f692e1 (diff) |
patch 8.2.3227: 'virtualedit' can only be set globallyv8.2.3227
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closes #8638)
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c index 267c76d317..6bdeded000 100644 --- a/src/edit.c +++ b/src/edit.c @@ -861,7 +861,7 @@ doESCkey: ins_ctrl_o(); // don't move the cursor left when 'virtualedit' has "onemore". - if (ve_flags & VE_ONEMORE) + if (get_ve_flags() & VE_ONEMORE) { ins_at_eol = FALSE; nomove = TRUE; @@ -2673,7 +2673,7 @@ oneright(void) // move "l" bytes right, but don't end up on the NUL, unless 'virtualedit' // contains "onemore". - if (ptr[l] == NUL && (ve_flags & VE_ONEMORE) == 0) + if (ptr[l] == NUL && (get_ve_flags() & VE_ONEMORE) == 0) return FAIL; curwin->w_cursor.col += l; @@ -3656,7 +3656,7 @@ ins_esc( #endif ) { - if (curwin->w_cursor.coladd > 0 || ve_flags == VE_ALL) + if (curwin->w_cursor.coladd > 0 || get_ve_flags() == VE_ALL) { oneleft(); if (restart_edit != NUL) |