diff options
author | Sean Dewar <6256228+seandewar@users.noreply.github.com> | 2024-03-09 22:32:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-09 22:32:20 +0000 |
commit | b596732831b5e947ce83c1153f0df10a0553c88d (patch) | |
tree | 0a6e874de0ba7fb9eb3ef71d89516281731401e7 /src/nvim/buffer.c | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
parent | c3d22d32ee4b4c1911ec15f2a77683d09b09f845 (diff) | |
download | rneovim-b596732831b5e947ce83c1153f0df10a0553c88d.tar.gz rneovim-b596732831b5e947ce83c1153f0df10a0553c88d.tar.bz2 rneovim-b596732831b5e947ce83c1153f0df10a0553c88d.zip |
Merge pull request #27330 from seandewar/win_set_config-fixes
fix(api): various window-related function fixes
This is a big one!
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index f6c7229485..7154be36be 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -117,7 +117,6 @@ # include "buffer.c.generated.h" #endif -static const char *e_auabort = N_("E855: Autocommands caused command to abort"); static const char e_attempt_to_delete_buffer_that_is_in_use_str[] = N_("E937: Attempt to delete a buffer that is in use: %s"); @@ -569,7 +568,7 @@ bool close_buffer(win_T *win, buf_T *buf, int action, bool abort_if_last, bool i } buf->b_locked--; buf->b_locked_split--; - if (abort_if_last && last_nonfloat(win)) { + if (abort_if_last && one_window(win)) { // Autocommands made this the only window. emsg(_(e_auabort)); return false; @@ -588,7 +587,7 @@ bool close_buffer(win_T *win, buf_T *buf, int action, bool abort_if_last, bool i } buf->b_locked--; buf->b_locked_split--; - if (abort_if_last && last_nonfloat(win)) { + if (abort_if_last && one_window(win)) { // Autocommands made this the only window. emsg(_(e_auabort)); return false; |