0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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

@@ -364,8 +364,11 @@
# define ESTACK_CHECK_SETUP estack_len_before = exestack.ga_len;
# define ESTACK_CHECK_NOW if (estack_len_before != exestack.ga_len) \
siemsg("Exestack length expected: %d, actual: %d", estack_len_before, exestack.ga_len);
# define CHECK_CURBUF if (curwin != NULL && curwin->w_buffer != curbuf) \
iemsg("curbuf != curwin->w_buffer")
#else
# define ESTACK_CHECK_DECLARATION
# define ESTACK_CHECK_SETUP
# define ESTACK_CHECK_NOW
# define CHECK_CURBUF
#endif