patch 7.4.1598
Problem: When starting the GUI fails a swap file is left behind. (Joerg
Plate)
Solution: Preserve files before exiting. (closes #692)
diff --git a/src/gui.c b/src/gui.c
index f52d217..d5c0d3e 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -105,7 +105,7 @@
/* If there is 'f' in 'guioptions' and specify -g argument,
* gui_mch_init_check() was not called yet. */
if (gui_mch_init_check() != OK)
- exit(1);
+ getout_preserve_modified(1);
#endif
gui_attempt_start();
}
@@ -272,7 +272,7 @@
#ifdef FEAT_GUI_GTK
/* Call gtk_init_check() here after fork(). See gui_init_check(). */
if (gui_mch_init_check() != OK)
- exit(1);
+ getout_preserve_modified(1);
#endif
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
@@ -309,7 +309,7 @@
/* If we failed to start the GUI, exit now. */
if (!gui.in_use)
- exit(1);
+ getout_preserve_modified(1);
}
/*