mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
lint
This commit is contained in:
@@ -5987,7 +5987,7 @@ static void ex_quit(exarg_T *eap)
|
||||
}
|
||||
|
||||
// If there are 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()) {
|
||||
exiting = true;
|
||||
}
|
||||
if ((!buf_hide(wp->w_buffer)
|
||||
@@ -6007,7 +6007,7 @@ static void ex_quit(exarg_T *eap)
|
||||
if (only_one_window() && (ONE_WINDOW || eap->addr_count == 0)) {
|
||||
getout(0);
|
||||
}
|
||||
/* close window; may free buffer */
|
||||
// close window; may free buffer
|
||||
win_close(wp, !buf_hide(wp->w_buffer) || eap->forceit);
|
||||
}
|
||||
}
|
||||
@@ -6123,11 +6123,12 @@ ex_win_close (
|
||||
}
|
||||
|
||||
|
||||
/* free buffer when not hiding it or when it's a scratch buffer */
|
||||
if (tp == NULL)
|
||||
// free buffer when not hiding it or when it's a scratch buffer
|
||||
if (tp == NULL) {
|
||||
win_close(win, !need_hide && !buf_hide(buf));
|
||||
else
|
||||
} else {
|
||||
win_close_othertab(win, !need_hide && !buf_hide(buf), tp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6928,15 +6929,14 @@ do_exedit (
|
||||
empty buffer */
|
||||
setpcmark();
|
||||
if (do_ecmd(0, (eap->cmdidx == CMD_enew ? NULL : eap->arg),
|
||||
NULL, eap,
|
||||
eap->do_ecmd_lnum,
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0)
|
||||
// After a split we can use an existing buffer.
|
||||
+ (old_curwin != NULL ? ECMD_OLDBUF : 0)
|
||||
+ (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0 )
|
||||
, old_curwin == NULL ? curwin : NULL) == FAIL) {
|
||||
/* Editing the file failed. If the window was split, close it. */
|
||||
NULL, eap, eap->do_ecmd_lnum,
|
||||
(buf_hide(curbuf) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0)
|
||||
// After a split we can use an existing buffer.
|
||||
+ (old_curwin != NULL ? ECMD_OLDBUF : 0)
|
||||
+ (eap->cmdidx == CMD_badd ? ECMD_ADDBUF : 0)
|
||||
, old_curwin == NULL ? curwin : NULL) == FAIL) {
|
||||
// Editing the file failed. If the window was split, close it.
|
||||
if (old_curwin != NULL) {
|
||||
need_hide = (curbufIsChanged() && curbuf->b_nwindows <= 1);
|
||||
if (!need_hide || buf_hide(curbuf)) {
|
||||
|
Reference in New Issue
Block a user