diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-10-01 22:37:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-10-01 22:37:40 +0200 |
commit | bdf931c25b4fe78877106ca529baee7899d0f6a4 (patch) | |
tree | 693f3dea4f0ab3c290b72b4dcc9b46cd5877c74e /src/autocmd.c | |
parent | 74273e66914e46eb5814c13a1b888e45358859b6 (diff) |
patch 8.2.1783: try-catch test failsv8.2.1783
Problem: Try-catch test fails.
Solution: Don't call win_enter(), only call enterering_window().
Diffstat (limited to 'src/autocmd.c')
-rw-r--r-- | src/autocmd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/autocmd.c b/src/autocmd.c index 4c2b705963..57b5674e14 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -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; |