diff options
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 6ae239c9c3..6e4e7afeb2 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -474,8 +474,8 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) return; } buf->b_locked--; - if (abort_if_last && one_window()) { - /* Autocommands made this the only window. */ + if (abort_if_last && last_nonfloat(win)) { + // Autocommands made this the only window. EMSG(_(e_auabort)); return; } @@ -491,8 +491,8 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) return; } buf->b_locked--; - if (abort_if_last && one_window()) { - /* Autocommands made this the only window. */ + if (abort_if_last && last_nonfloat(win)) { + // Autocommands made this the only window. EMSG(_(e_auabort)); return; } |