diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-14 16:18:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-14 16:18:15 +0100 |
commit | a6e8f888e7fc31b8ab7233509254fb2e2fe4089f (patch) | |
tree | cef20e90b6736c286442b40a1169aed2263ec984 /src/window.c | |
parent | f5f4b6cb5f6174458848d2fbc0388379222c8a0f (diff) | |
download | vim-git-a6e8f888e7fc31b8ab7233509254fb2e2fe4089f.tar.gz |
patch 8.2.0004: get E685 and E931 if buffer reload is interruptedv8.2.0004
Problem: Get E685 and E931 if buffer reload is interrupted.
Solution: Do not abort deleting a dummy buffer. (closes #5361)
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 5b407d5b6..b66fb34fe 100644 --- a/src/window.c +++ b/src/window.c @@ -2410,7 +2410,7 @@ win_close_buffer(win_T *win, int action, int abort_if_last) 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 @@ win_close_othertab(win_T *win, int free_buf, tabpage_T *tp) 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 @@ win_free_popup(win_T *win) 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); |