summaryrefslogtreecommitdiff
path: root/src/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui.c b/src/gui.c
index cf121cfac..02a14b90d 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -187,9 +187,10 @@ gui_start()
#endif
#ifdef FEAT_AUTOCMD
- /* If the GUI started successfully, trigger the GUIEnter event */
- if (gui.in_use)
- apply_autocmds(EVENT_GUIENTER, NULL, NULL, FALSE, curbuf);
+ /* If the GUI started successfully, trigger the GUIEnter event, otherwise
+ * the GUIFailed event. */
+ apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
+ NULL, NULL, FALSE, curbuf);
#endif
--recursive;