mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.1783: try-catch test fails
Problem: Try-catch test fails.
Solution: Don't call win_enter(), only call enterering_window().
bdf931c25b
v8.2.1781 caused Test_reload_in_try_catch() from v8.2.0004 to fail in Vim, but
it has not been ported yet.
This commit is contained in:
parent
38cd91de5f
commit
a128b64e73
@ -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;
|
||||
|
@ -197,7 +197,12 @@ func RunTheTest(test)
|
||||
|
||||
" Close any extra tab pages and windows and make the current one not modified.
|
||||
while tabpagenr('$') > 1
|
||||
let winid = win_getid()
|
||||
quit!
|
||||
if winid == win_getid()
|
||||
echoerr 'Could not quit window'
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
while 1
|
||||
|
@ -2256,7 +2256,7 @@ static void leaving_window(win_T *const win)
|
||||
}
|
||||
}
|
||||
|
||||
static void entering_window(win_T *const win)
|
||||
void entering_window(win_T *const win)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
// Only matters for a prompt window.
|
||||
|
Loading…
Reference in New Issue
Block a user