To: vim_dev@googlegroups.com Subject: Patch 7.4.666 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.666 Problem: There is a chance that Vim may lock up. Solution: Handle timer events differently. (Aaron Burrow) Files: src/os_unix.c *** ../vim-7.4.665/src/os_unix.c 2014-12-17 17:59:26.912631374 +0100 --- src/os_unix.c 2015-03-20 16:21:43.269619610 +0100 *************** *** 7096,7114 **** { XEvent event; ! while (XtAppPending(app_context) && !vim_is_input_buf_full()) { ! XtAppNextEvent(app_context, &event); ! #ifdef FEAT_CLIENTSERVER { ! XPropertyEvent *e = (XPropertyEvent *)&event; ! if (e->type == PropertyNotify && e->window == commWindow && e->atom == commProperty && e->state == PropertyNewValue) ! serverEventProc(xterm_dpy, &event); ! } #endif ! XtDispatchEvent(&event); } } --- 7096,7128 ---- { XEvent event; ! for (;;) { ! XtInputMask mask = XtAppPending(app_context); ! ! if (mask == 0 || vim_is_input_buf_full()) ! break; ! ! if (mask & XtIMXEvent) { ! /* There is an event to process. */ ! XtAppNextEvent(app_context, &event); ! #ifdef FEAT_CLIENTSERVER ! { ! XPropertyEvent *e = (XPropertyEvent *)&event; ! if (e->type == PropertyNotify && e->window == commWindow && e->atom == commProperty && e->state == PropertyNewValue) ! serverEventProc(xterm_dpy, &event); ! } #endif ! XtDispatchEvent(&event); ! } ! else ! { ! /* There is something else than an event to process. */ ! XtAppProcessEvent(app_context, mask); ! } } } *** ../vim-7.4.665/src/version.c 2015-03-20 15:58:47.417117245 +0100 --- src/version.c 2015-03-20 16:07:37.499149050 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 666, /**/ -- Q: How many hardware engineers does it take to change a lightbulb? A: None. We'll fix it in software. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///