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.
e664a32701
This commit is contained in:
Sean Dewar
2022-01-07 17:27:47 +00:00
parent f326c9a77d
commit d984a8d130
2 changed files with 22 additions and 0 deletions

View File

@@ -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);
}
}
}