1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2022-01-06 13:24:51 +00:00
parent a33737b6d8
commit 18f4740f04
10 changed files with 109 additions and 88 deletions

View File

@@ -6864,8 +6864,7 @@ f_line(typval_T *argvars, typval_T *rettv)
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 @@ f_line(typval_T *argvars, typval_T *rettv)
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