aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2022-01-07 17:27:47 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2022-02-03 15:03:08 +0000
commitd984a8d130c2063dcd33ae52f98c22fe3567cd18 (patch)
tree371a5b81baab7cccc4986502a7c2fe3f2b10cb35 /src/nvim/eval/funcs.c
parentf326c9a77da3aef052ce6af0f851344f2479c844 (diff)
downloadrneovim-d984a8d130c2063dcd33ae52f98c22fe3567cd18.tar.gz
rneovim-d984a8d130c2063dcd33ae52f98c22fe3567cd18.tar.bz2
rneovim-d984a8d130c2063dcd33ae52f98c22fe3567cd18.zip
vim-patch:8.2.4026: ml_get error with specific win_execute() command
Problem: ml_get error with specific win_execute() command. (Sean Dewar) Solution: Check cursor and Visual area are OK. https://github.com/vim/vim/commit/e664a327014f4aa8baf8549a34a4caab2f3116a3
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 3cfc00fea2..b16041b832 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -2193,6 +2193,13 @@ static void f_win_execute(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (win_valid(wp) && !equalpos(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);
+ }
}
}