From e664a327014f4aa8baf8549a34a4caab2f3116a3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 7 Jan 2022 14:08:03 +0000 Subject: 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. --- src/evalwindow.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/evalwindow.c') diff --git a/src/evalwindow.c b/src/evalwindow.c index d29f3e4baa..2a97adcf26 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); } } -- cgit v1.2.3