]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.666 v7.4.666
authorBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 15:26:54 +0000 (16:26 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 20 Mar 2015 15:26:54 +0000 (16:26 +0100)
Problem:    There is a chance that Vim may lock up.
Solution:   Handle timer events differently. (Aaron Burrow)

src/os_unix.c
src/version.c

index bcf11ddc7636d44eedafcfa5707251b8deadb656..8f6b9143ee1e339278a5ab99960f71d66cfd87ba 100644 (file)
@@ -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);
+        }
     }
 }
 
index a9b8043a73ab0d529d191065ea75ced1e8cebf30..f9b47b17f0bd764d51c66b7cb4d39f5918dfb30d 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    666,
 /**/
     665,
 /**/