comparison src/autocmd.c @ 22470:f7471450243c v8.2.1783

patch 8.2.1783: try-catch test fails Commit: https://github.com/vim/vim/commit/bdf931c25b4fe78877106ca529baee7899d0f6a4 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 1 22:37:40 2020 +0200 patch 8.2.1783: try-catch test fails Problem: Try-catch test fails. Solution: Don't call win_enter(), only call enterering_window().
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Oct 2020 22:45:05 +0200
parents 18f400b24f5f
children fba5ccf33794
comparison
equal deleted inserted replaced
22469:fd9b84013893 22470:f7471450243c
1531 restore_snapshot(SNAP_AUCMD_IDX, FALSE); 1531 restore_snapshot(SNAP_AUCMD_IDX, FALSE);
1532 (void)win_comp_pos(); // recompute window positions 1532 (void)win_comp_pos(); // recompute window positions
1533 unblock_autocmds(); 1533 unblock_autocmds();
1534 1534
1535 if (win_valid(aco->save_curwin)) 1535 if (win_valid(aco->save_curwin))
1536 win_enter(aco->save_curwin, TRUE); 1536 curwin = aco->save_curwin;
1537 else 1537 else
1538 // Hmm, original window disappeared. Just use the first one. 1538 // Hmm, original window disappeared. Just use the first one.
1539 curwin = firstwin; 1539 curwin = firstwin;
1540 curbuf = curwin->w_buffer;
1541 #ifdef FEAT_JOB_CHANNEL
1542 // May need to restore insert mode for a prompt buffer.
1543 entering_window(curwin);
1544 #endif
1545
1540 if (win_valid(aco->save_prevwin)) 1546 if (win_valid(aco->save_prevwin))
1541 prevwin = aco->save_prevwin; 1547 prevwin = aco->save_prevwin;
1542 #ifdef FEAT_EVAL 1548 #ifdef FEAT_EVAL
1543 vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables 1549 vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
1544 hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab 1550 hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
1545 #endif 1551 #endif
1546 curbuf = curwin->w_buffer;
1547
1548 vim_free(globaldir); 1552 vim_free(globaldir);
1549 globaldir = aco->globaldir; 1553 globaldir = aco->globaldir;
1550 1554
1551 // the buffer contents may have changed 1555 // the buffer contents may have changed
1552 check_cursor(); 1556 check_cursor();