patch 8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem: ml_get error when win_execute redraws with Visual selection.
Solution: Disable Visual area temporarily. (closes #9479)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 27f8d46..fc2fd07 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -6864,8 +6864,7 @@
int id;
tabpage_T *tp;
win_T *wp;
- win_T *save_curwin;
- tabpage_T *save_curtab;
+ switchwin_T switchwin;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
@@ -6879,13 +6878,12 @@
wp = win_id2wp_tp(id, &tp);
if (wp != NULL && tp != NULL)
{
- if (switch_win_noblock(&save_curwin, &save_curtab, wp, tp, TRUE)
- == OK)
+ if (switch_win_noblock(&switchwin, wp, tp, TRUE) == OK)
{
check_cursor();
fp = var2fpos(&argvars[0], TRUE, &fnum, FALSE);
}
- restore_win_noblock(save_curwin, save_curtab, TRUE);
+ restore_win_noblock(&switchwin, TRUE);
}
}
else