summaryrefslogtreecommitdiff
path: root/src/evalwindow.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-07 14:08:03 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-07 14:08:03 +0000
commite664a327014f4aa8baf8549a34a4caab2f3116a3 (patch)
treedc75ceac6fc4f9868e5d4f383bb3d660a194cf67 /src/evalwindow.c
parent834d41853e12b9022f60b08c32480928c2a9e48f (diff)
downloadvim-git-e664a327014f4aa8baf8549a34a4caab2f3116a3.tar.gz
patch 8.2.4026: ml_get error with specific win_execute() commandv8.2.4026
Problem: ml_get error with specific win_execute() command. (Sean Dewar) Solution: Check cursor and Visual area are OK.
Diffstat (limited to 'src/evalwindow.c')
-rw-r--r--src/evalwindow.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/evalwindow.c b/src/evalwindow.c
index d29f3e4ba..2a97adcf2 100644
--- a/src/evalwindow.c
+++ b/src/evalwindow.c
@@ -743,6 +743,12 @@ f_win_execute(typval_T *argvars, typval_T *rettv)
// Update the status line if the cursor moved.
if (win_valid(wp) && !EQUAL_POS(curpos, wp->w_cursor))
wp->w_redr_status = TRUE;
+
+ // In case the command moved the cursor or changed the Visual area,
+ // check it is valid.
+ check_cursor();
+ if (VIsual_active)
+ check_pos(curbuf, &VIsual);
}
}