0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1948: GUI: crash when handling message while closing a window

Problem:    GUI: crash when handling message while closing a window. (Srinath
            Avadhanula)
Solution:   Don't handle message while closing a window. (closes #7250)
This commit is contained in:
Bram Moolenaar
2020-11-04 11:03:12 +01:00
parent c136a3528b
commit 4778b4d0e1
4 changed files with 18 additions and 1 deletions

View File

@@ -2569,7 +2569,12 @@ win_close(win_T *win, int free_buf)
// Now we are really going to close the window. Disallow any autocommand
// to split a window to avoid trouble.
// Also bail out of parse_queued_messages() to avoid it tries to update the
// screen.
++split_disallowed;
#ifdef MESSAGE_QUEUE
++dont_parse_messages;
#endif
// Free the memory used for the window and get the window that received
// the screen space.
@@ -2626,6 +2631,9 @@ win_close(win_T *win, int free_buf)
}
--split_disallowed;
#ifdef MESSAGE_QUEUE
--dont_parse_messages;
#endif
/*
* If last window has a status line now and we don't want one,