summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c11
1 files changed, 11 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);
}