Mercurial > vim
comparison src/window.c @ 22800:8e7cbf73c3a0 v8.2.1948
patch 8.2.1948: GUI: crash when handling message while closing a window
Commit: https://github.com/vim/vim/commit/4778b4d0e147793a4254cbda9c0e270250e970f5
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 4 11:03:12 2020 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Nov 2020 11:15:04 +0100 |
parents | e871a824efc9 |
children | 80bd5de5dcab |
comparison
equal
deleted
inserted
replaced
22799:6df1709467f8 | 22800:8e7cbf73c3a0 |
---|---|
2567 || close_last_window_tabpage(win, free_buf, prev_curtab)) | 2567 || close_last_window_tabpage(win, free_buf, prev_curtab)) |
2568 return FAIL; | 2568 return FAIL; |
2569 | 2569 |
2570 // Now we are really going to close the window. Disallow any autocommand | 2570 // Now we are really going to close the window. Disallow any autocommand |
2571 // to split a window to avoid trouble. | 2571 // to split a window to avoid trouble. |
2572 // Also bail out of parse_queued_messages() to avoid it tries to update the | |
2573 // screen. | |
2572 ++split_disallowed; | 2574 ++split_disallowed; |
2575 #ifdef MESSAGE_QUEUE | |
2576 ++dont_parse_messages; | |
2577 #endif | |
2573 | 2578 |
2574 // Free the memory used for the window and get the window that received | 2579 // Free the memory used for the window and get the window that received |
2575 // the screen space. | 2580 // the screen space. |
2576 wp = win_free_mem(win, &dir, NULL); | 2581 wp = win_free_mem(win, &dir, NULL); |
2577 | 2582 |
2624 // careful: after this wp and win may be invalid! | 2629 // careful: after this wp and win may be invalid! |
2625 apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); | 2630 apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); |
2626 } | 2631 } |
2627 | 2632 |
2628 --split_disallowed; | 2633 --split_disallowed; |
2634 #ifdef MESSAGE_QUEUE | |
2635 --dont_parse_messages; | |
2636 #endif | |
2629 | 2637 |
2630 /* | 2638 /* |
2631 * If last window has a status line now and we don't want one, | 2639 * If last window has a status line now and we don't want one, |
2632 * remove the status line. | 2640 * remove the status line. |
2633 */ | 2641 */ |