mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lint
This commit is contained in:
parent
b0e34497b3
commit
53ccd07fa1
@ -4518,8 +4518,8 @@ void ex_buffer_all(exarg_T *eap)
|
|||||||
? wp->w_height + wp->w_status_height < Rows - p_ch
|
? wp->w_height + wp->w_status_height < Rows - p_ch
|
||||||
- tabline_height()
|
- tabline_height()
|
||||||
: wp->w_width != Columns)
|
: wp->w_width != Columns)
|
||||||
|| (had_tab > 0 && wp != firstwin)
|
|| (had_tab > 0 && wp != firstwin))
|
||||||
) && firstwin != lastwin
|
&& firstwin != lastwin
|
||||||
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)
|
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)
|
||||||
) {
|
) {
|
||||||
win_close(wp, FALSE);
|
win_close(wp, FALSE);
|
||||||
|
@ -5833,11 +5833,12 @@ static void ex_quit_all(exarg_T *eap)
|
|||||||
text_locked_msg();
|
text_locked_msg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
|
apply_autocmds(EVENT_QUITPRE, NULL, NULL, false, curbuf);
|
||||||
/* Refuse to quit 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). */
|
// being closed (can only happen in autocommands).
|
||||||
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0))
|
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
exiting = true;
|
exiting = true;
|
||||||
if (eap->forceit || !check_changed_any(false, false)) {
|
if (eap->forceit || !check_changed_any(false, false)) {
|
||||||
@ -6128,11 +6129,12 @@ static void ex_exit(exarg_T *eap)
|
|||||||
text_locked_msg();
|
text_locked_msg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
|
apply_autocmds(EVENT_QUITPRE, NULL, NULL, false, curbuf);
|
||||||
/* Refuse to quit 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). */
|
// being closed (can only happen in autocommands).
|
||||||
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0))
|
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_locked > 0)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if more files or windows we won't exit
|
// if more files or windows we won't exit
|
||||||
if (check_more(false, eap->forceit) == OK && only_one_window()) {
|
if (check_more(false, eap->forceit) == OK && only_one_window()) {
|
||||||
|
@ -1746,7 +1746,7 @@ void close_windows(buf_T *buf, int keep_curwin)
|
|||||||
FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
|
FOR_ALL_WINDOWS_IN_TAB(wp, tp) {
|
||||||
if (wp->w_buffer == buf
|
if (wp->w_buffer == buf
|
||||||
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)) {
|
&& !(wp->w_closing || wp->w_buffer->b_locked > 0)) {
|
||||||
win_close_othertab(wp, FALSE, tp);
|
win_close_othertab(wp, false, tp);
|
||||||
|
|
||||||
/* Start all over, the tab page may be closed and
|
/* Start all over, the tab page may be closed and
|
||||||
* autocommands may change the window layout. */
|
* autocommands may change the window layout. */
|
||||||
@ -1881,7 +1881,8 @@ int win_close(win_T *win, int free_buf)
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (win->w_closing || (win->w_buffer != NULL && win->w_buffer->b_locked > 0)) {
|
if (win->w_closing
|
||||||
|
|| (win->w_buffer != NULL && win->w_buffer->b_locked > 0)) {
|
||||||
return FAIL; // window is already being closed
|
return FAIL; // window is already being closed
|
||||||
}
|
}
|
||||||
if (win == aucmd_win) {
|
if (win == aucmd_win) {
|
||||||
|
Loading…
Reference in New Issue
Block a user