patch 8.2.0004: get E685 and E931 if buffer reload is interrupted
Problem: Get E685 and E931 if buffer reload is interrupted.
Solution: Do not abort deleting a dummy buffer. (closes #5361)
diff --git a/src/window.c b/src/window.c
index 5b407d5..b66fb34 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2410,7 +2410,7 @@
set_bufref(&bufref, curbuf);
win->w_closing = TRUE;
- close_buffer(win, win->w_buffer, action, abort_if_last);
+ close_buffer(win, win->w_buffer, action, abort_if_last, FALSE);
if (win_valid_any_tab(win))
win->w_closing = FALSE;
// Make sure curbuf is valid. It can become invalid if 'bufhidden' is
@@ -2677,7 +2677,8 @@
if (win->w_buffer != NULL)
// Close the link to the buffer.
- close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, FALSE);
+ close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0,
+ FALSE, FALSE);
// Careful: Autocommands may have closed the tab page or made it the
// current tab page.
@@ -5001,7 +5002,7 @@
if (bt_popup(win->w_buffer))
win_close_buffer(win, DOBUF_WIPE_REUSE, FALSE);
else
- close_buffer(win, win->w_buffer, 0, FALSE);
+ close_buffer(win, win->w_buffer, 0, FALSE, FALSE);
# if defined(FEAT_TIMERS)
if (win->w_popup_timer != NULL)
stop_timer(win->w_popup_timer);