mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Linting fixups for vim-patch:7.4.1037
This commit is contained in:
parent
8c399d6b37
commit
fcd5d3ad21
@ -1263,8 +1263,9 @@ int check_changed_any(bool hidden, bool unload)
|
|||||||
++bufcount;
|
++bufcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bufcount == 0)
|
if (bufcount == 0) {
|
||||||
return FALSE;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bufnrs = xmalloc(sizeof(*bufnrs) * bufcount);
|
bufnrs = xmalloc(sizeof(*bufnrs) * bufcount);
|
||||||
|
|
||||||
|
@ -5671,9 +5671,9 @@ static void ex_quit(exarg_T *eap)
|
|||||||
exiting = TRUE;
|
exiting = TRUE;
|
||||||
if ((!P_HID(curbuf)
|
if ((!P_HID(curbuf)
|
||||||
&& check_changed(curbuf, (p_awa ? CCGD_AW : 0)
|
&& check_changed(curbuf, (p_awa ? CCGD_AW : 0)
|
||||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||||
| CCGD_EXCMD))
|
| CCGD_EXCMD))
|
||||||
|| check_more(TRUE, eap->forceit) == FAIL
|
|| check_more(true, eap->forceit) == FAIL
|
||||||
|| (only_one_window() && check_changed_any(eap->forceit, true))) {
|
|| (only_one_window() && check_changed_any(eap->forceit, true))) {
|
||||||
not_exiting();
|
not_exiting();
|
||||||
} else {
|
} else {
|
||||||
@ -6011,21 +6011,22 @@ static void ex_exit(exarg_T *eap)
|
|||||||
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
|
if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing))
|
||||||
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()) {
|
||||||
*/
|
exiting = true;
|
||||||
if (check_more(FALSE, eap->forceit) == OK && only_one_window())
|
}
|
||||||
exiting = TRUE;
|
if (((eap->cmdidx == CMD_wq
|
||||||
if ( ((eap->cmdidx == CMD_wq
|
|| curbufIsChanged())
|
||||||
|| curbufIsChanged())
|
&& do_write(eap) == FAIL)
|
||||||
&& do_write(eap) == FAIL)
|
|| check_more(true, eap->forceit) == FAIL
|
||||||
|| check_more(TRUE, eap->forceit) == FAIL
|
|| (only_one_window() && check_changed_any(eap->forceit, false))) {
|
||||||
|| (only_one_window() && check_changed_any(eap->forceit, false))) {
|
|
||||||
not_exiting();
|
not_exiting();
|
||||||
} else {
|
} else {
|
||||||
if (only_one_window()) /* quit last window, exit Vim */
|
if (only_one_window()) {
|
||||||
|
// quit last window, exit Vim
|
||||||
getout(0);
|
getout(0);
|
||||||
/* Quit current window, may free the buffer. */
|
}
|
||||||
|
// Quit current window, may free the buffer.
|
||||||
win_close(curwin, !P_HID(curwin->w_buffer));
|
win_close(curwin, !P_HID(curwin->w_buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user