0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2016-03-19 14:48:31 +01:00
parent 9f6154f26e
commit 6d8d849f5a
3 changed files with 9 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ gui_start(void)
/* 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 @@ gui_do_fork(void)
#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 @@ gui_do_fork(void)
/* If we failed to start the GUI, exit now. */
if (!gui.in_use)
exit(1);
getout_preserve_modified(1);
}
/*

View File

@@ -1355,7 +1355,7 @@ main_loop(
}
#if defined(USE_XSMP) || defined(FEAT_GUI_MSWIN) || defined(PROTO)
#if defined(USE_XSMP) || defined(FEAT_GUI) || defined(PROTO)
/*
* Exit, but leave behind swap files for modified buffers.
*/
@@ -1377,7 +1377,9 @@ getout_preserve_modified(int exitval)
#endif
/* Exit properly */
/*
* Exit properly.
*/
void
getout(int exitval)
{

View File

@@ -748,6 +748,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1598,
/**/
1597,
/**/