summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2014-12-17 17:59:31 +0100
committerBram Moolenaar <bram@vim.org>2014-12-17 17:59:31 +0100
commit5adb5438d1b7f5f81d41f608acf8a761e3af18b3 (patch)
treedeaac0fc559c1a2370ffbc2ac49389bffab7ce2b
parentc093009d2f3c9e1eb1a3c1c9ad87e78bc381853a (diff)
downloadvim-7.4.558.tar.gz
updated for version 7.4.558v7.4.558v7-4-558
Problem: When the X server restarts Vim may get stuck. Solution: Destroy the application context and create it again. (Issue 203)
-rw-r--r--src/os_unix.c11
-rw-r--r--src/version.c2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index ff883452..bcf11ddc 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1617,6 +1617,17 @@ may_restore_clipboard()
if (xterm_dpy_was_reset)
{
xterm_dpy_was_reset = FALSE;
+
+# ifndef LESSTIF_VERSION
+ /* This has been reported to avoid Vim getting stuck. */
+ if (app_context != (XtAppContext)NULL)
+ {
+ XtDestroyApplicationContext(app_context);
+ app_context = (XtAppContext)NULL;
+ x11_display = NULL; /* freed by XtDestroyApplicationContext() */
+ }
+# endif
+
setup_term_clip();
get_x11_title(FALSE);
}
diff --git a/src/version.c b/src/version.c
index 514193a9..4efee6ae 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 558,
+/**/
557,
/**/
556,