0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.1783: try-catch test fails

Problem:    Try-catch test fails.
Solution:   Don't call win_enter(), only call enterering_window().
This commit is contained in:
Bram Moolenaar
2020-10-01 22:37:40 +02:00
parent 74273e6691
commit bdf931c25b
5 changed files with 16 additions and 4 deletions

View File

@@ -1533,18 +1533,22 @@ win_found:
unblock_autocmds();
if (win_valid(aco->save_curwin))
win_enter(aco->save_curwin, TRUE);
curwin = aco->save_curwin;
else
// Hmm, original window disappeared. Just use the first one.
curwin = firstwin;
curbuf = curwin->w_buffer;
#ifdef FEAT_JOB_CHANNEL
// May need to restore insert mode for a prompt buffer.
entering_window(curwin);
#endif
if (win_valid(aco->save_prevwin))
prevwin = aco->save_prevwin;
#ifdef FEAT_EVAL
vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
#endif
curbuf = curwin->w_buffer;
vim_free(globaldir);
globaldir = aco->globaldir;