summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-29 12:21:58 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-29 12:21:58 +0200
commit3552e742898cd57adaf9b8ce32a9056271eab8d2 (patch)
tree9467d5130f7a5adcc12717cf9a75d7ee5571e971 /src/gui.c
parentd0edaf9dc253e619ccc321ceaac321aee11c1ea5 (diff)
patch 8.2.2898: QuitPre and ExitPre not triggered when GUI window is closedv8.2.2898
Problem: QuitPre and ExitPre not triggered when GUI window is closed. Solution: Call before_quit_autocmds(). (closes #8242)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui.c b/src/gui.c
index c0374c561d..2539a4f642 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -857,9 +857,10 @@ gui_exit(int rc)
void
gui_shell_closed(void)
{
- cmdmod_T save_cmdmod;
+ cmdmod_T save_cmdmod = cmdmod;
- save_cmdmod = cmdmod;
+ if (before_quit_autocmds(curwin, TRUE, FALSE))
+ return;
// Only exit when there are no changed files
exiting = TRUE;