Mercurial > vim
diff src/window.c @ 18886:050f5eaa9e50 v8.2.0004
patch 8.2.0004: get E685 and E931 if buffer reload is interrupted
Commit: https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 14 16:18:15 2019 +0100
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 https://github.com/vim/vim/issues/5361)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 14 Dec 2019 16:30:04 +0100 |
parents | 15539899a112 |
children | bfcafd1a3e37 |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -2410,7 +2410,7 @@ win_close_buffer(win_T *win, int action, 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_ 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);