aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-11-07 21:46:06 +0000
committerSean Dewar <seandewar@users.noreply.github.com>2021-12-07 11:34:27 +0000
commita128b64e73322a41b175811dc88a7f7046278de3 (patch)
tree6ea669a516e82796d81337c596baac7dfb6df598 /src/nvim/autocmd.c
parent38cd91de5f0f89daccdcbac16508af830d8001d7 (diff)
downloadrneovim-a128b64e73322a41b175811dc88a7f7046278de3.tar.gz
rneovim-a128b64e73322a41b175811dc88a7f7046278de3.tar.bz2
rneovim-a128b64e73322a41b175811dc88a7f7046278de3.zip
vim-patch:8.2.1783: try-catch test fails
Problem: Try-catch test fails. Solution: Don't call win_enter(), only call enterering_window(). https://github.com/vim/vim/commit/bdf931c25b4fe78877106ca529baee7899d0f6a4 v8.2.1781 caused Test_reload_in_try_catch() from v8.2.0004 to fail in Vim, but it has not been ported yet.
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r--src/nvim/autocmd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index e274d00a77..9044657358 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -1208,15 +1208,18 @@ win_found:
win_T *const save_curwin = win_find_by_handle(aco->save_curwin_handle);
if (save_curwin != NULL) {
- win_enter(save_curwin, true);
+ curwin = save_curwin;
} else {
// Hmm, original window disappeared. Just use the first one.
curwin = firstwin;
}
+ curbuf = curwin->w_buffer;
+ // May need to restore insert mode for a prompt buffer.
+ entering_window(curwin);
+
prevwin = win_find_by_handle(aco->save_prevwin_handle);
vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
- curbuf = curwin->w_buffer;
xfree(globaldir);
globaldir = aco->globaldir;