summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-03-20 16:26:54 +0100
committerBram Moolenaar <Bram@vim.org>2015-03-20 16:26:54 +0100
commitb1fc2bf29c560ca60515950812e8672c6dca1a4c (patch)
tree8e12bb21c642c18af7d109df2d6da99f5fdc9690
parent76feaf1bfed170d2fc5c34e7e758885554ecc794 (diff)
downloadvim-git-b1fc2bf29c560ca60515950812e8672c6dca1a4c.tar.gz
updated for version 7.4.666v7.4.666
Problem: There is a chance that Vim may lock up. Solution: Handle timer events differently. (Aaron Burrow)
-rw-r--r--src/os_unix.c30
-rw-r--r--src/version.c2
2 files changed, 24 insertions, 8 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index bcf11ddc7..8f6b9143e 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -7096,19 +7096,33 @@ xterm_update()
{
XEvent event;
- while (XtAppPending(app_context) && !vim_is_input_buf_full())
+ for (;;)
{
- XtAppNextEvent(app_context, &event);
-#ifdef FEAT_CLIENTSERVER
+ XtInputMask mask = XtAppPending(app_context);
+
+ if (mask == 0 || vim_is_input_buf_full())
+ break;
+
+ if (mask & XtIMXEvent)
{
- XPropertyEvent *e = (XPropertyEvent *)&event;
+ /* There is an event to process. */
+ XtAppNextEvent(app_context, &event);
+#ifdef FEAT_CLIENTSERVER
+ {
+ XPropertyEvent *e = (XPropertyEvent *)&event;
- if (e->type == PropertyNotify && e->window == commWindow
+ if (e->type == PropertyNotify && e->window == commWindow
&& e->atom == commProperty && e->state == PropertyNewValue)
- serverEventProc(xterm_dpy, &event);
- }
+ serverEventProc(xterm_dpy, &event);
+ }
#endif
- XtDispatchEvent(&event);
+ XtDispatchEvent(&event);
+ }
+ else
+ {
+ /* There is something else than an event to process. */
+ XtAppProcessEvent(app_context, mask);
+ }
}
}
diff --git a/src/version.c b/src/version.c
index a9b8043a7..f9b47b17f 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 */
/**/
+ 666,
+/**/
665,
/**/
664,