aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-01-27 08:34:57 +0100
committerGitHub <noreply@github.com>2022-01-27 08:34:57 +0100
commitd50dd1272550346164b05cfc82b3a0aea6dd6b84 (patch)
tree6612fbc107618b04ea830b076f9510f5111a030d /src/nvim/edit.c
parent55ad48d93955462905622a42a460ffccd99aa77a (diff)
parent6c22e5fd1a4e6d945bb76a4a8a558613f99ec793 (diff)
downloadrneovim-d50dd1272550346164b05cfc82b3a0aea6dd6b84.tar.gz
rneovim-d50dd1272550346164b05cfc82b3a0aea6dd6b84.tar.bz2
rneovim-d50dd1272550346164b05cfc82b3a0aea6dd6b84.zip
Merge pull request #17095 from zeertzjq/vim-8.2.3227
vim-patch:8.2.{3227,3280,4094}: global-local 'virtualedit'
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index cafc764ddf..2f25cdb596 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -913,7 +913,7 @@ static int insert_handle_key(InsertState *s)
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;
s->nomove = true;
}
@@ -6909,8 +6909,7 @@ int 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;
@@ -8032,7 +8031,7 @@ static bool ins_esc(long *count, int cmdchar, bool nomove)
&& !VIsual_active
))
&& !revins_on) {
- 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) {
curwin->w_cursor.coladd++;