From 9a1675b065394734ddaef91a314896028e2b1d46 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 26 Apr 2017 15:28:10 +0200 Subject: floats: implement floating windows Co-Author: Dongdong Zhou --- src/nvim/buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nvim/buffer.c') 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; } -- cgit