diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c index 5012427fa..0088e3264 100644 --- a/src/window.c +++ b/src/window.c @@ -1271,7 +1271,7 @@ win_init(newp, oldp, flags) } /* - * Initialize window "newp" from window"old". + * Initialize window "newp" from window "old". * Only the essential things are copied. */ static void @@ -6662,8 +6662,8 @@ restore_snapshot_rec(sn, fr) || defined(PROTO) /* * Set "win" to be the curwin and "tp" to be the current tab page. - * restore_win() MUST be called to undo. - * No autocommands will be executed. + * restore_win() MUST be called to undo, also when FAIL is returned. + * No autocommands will be executed until restore_win() is called. * When "no_display" is TRUE the display won't be affected, no redraw is * triggered, another tabpage access is limited. * Returns FAIL if switching to "win" failed. @@ -6696,12 +6696,7 @@ switch_win(save_curwin, save_curtab, win, tp, no_display) goto_tabpage_tp(tp, FALSE, FALSE); } if (!win_valid(win)) - { -# ifdef FEAT_AUTOCMD - unblock_autocmds(); -# endif return FAIL; - } curwin = win; curbuf = curwin->w_buffer; # endif |