}
#ifdef FEAT_AUTOCMD
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
- /* Refuse to quick when locked or when the buffer in the last window is
+ /* Refuse to quit when locked or when the buffer in the last window is
* being closed (can only happen in autocommands). */
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
return;
return;
}
#ifdef FEAT_AUTOCMD
- if (curbuf_locked())
+ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+ /* Refuse to quit when locked or when the buffer in the last window is
+ * being closed (can only happen in autocommands). */
+ if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
return;
#endif
return;
}
#ifdef FEAT_AUTOCMD
- if (curbuf_locked())
+ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
+ /* Refuse to quit when locked or when the buffer in the last window is
+ * being closed (can only happen in autocommands). */
+ if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
return;
#endif