1
0
forked from aniani/vim

patch 8.2.0371: crash with combination of terminal popup and autocmd

Problem:    Crash with combination of terminal popup and autocmd.
Solution:   Disallow closing a popup that is the current window.  Add a check
            that the current buffer is valid. (closes #5754)
This commit is contained in:
Bram Moolenaar
2020-03-11 14:19:58 +01:00
parent e49b4bb895
commit cee52204ca
6 changed files with 53 additions and 2 deletions

View File

@@ -382,6 +382,7 @@ term_close_buffer(buf_T *buf, buf_T *old_curbuf)
curwin->w_buffer = curbuf;
++curbuf->b_nwindows;
}
CHECK_CURBUF;
// Wiping out the buffer will also close the window and call
// free_terminal().