diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-09-15 14:12:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-09-15 14:12:05 +0200 |
commit | 93c88e0f6a4a8f7634ed84721daf4af46fc0d5db (patch) | |
tree | b325606d26d69c3804a9007cf7d1fa4a8034f4aa /src/os_unix.c | |
parent | ed84b76021df763619cabaedddc44eb5ee849136 (diff) | |
download | vim-git-7.4.866.tar.gz |
patch 7.4.866v7.4.866
Problem: Crash when changing the 'tags' option from a remote command.
(Benjamin Fritz)
Solution: Instead of executing messages immediately, use a queue, like for
netbeans. (James Kolb)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 2439c5e25..8f059be8f 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -388,9 +388,8 @@ mch_inchar(buf, maxlen, wtime, tb_change_cnt) { int len; -#ifdef FEAT_NETBEANS_INTG - /* Process the queued netbeans messages. */ - netbeans_parse_messages(); +#ifdef MESSAGE_QUEUE + parse_queued_messages(); #endif /* Check if window changed size while we were busy, perhaps the ":set @@ -405,9 +404,8 @@ mch_inchar(buf, maxlen, wtime, tb_change_cnt) if (!do_resize) /* return if not interrupted by resize */ return 0; handle_resize(); -#ifdef FEAT_NETBEANS_INTG - /* Process the queued netbeans messages. */ - netbeans_parse_messages(); +#ifdef MESSAGE_QUEUE + parse_queued_messages(); #endif } } @@ -439,9 +437,8 @@ mch_inchar(buf, maxlen, wtime, tb_change_cnt) while (do_resize) /* window changed size */ handle_resize(); -#ifdef FEAT_NETBEANS_INTG - /* Process the queued netbeans messages. */ - netbeans_parse_messages(); +#ifdef MESSAGE_QUEUE + parse_queued_messages(); #endif /* * We want to be interrupted by the winch signal @@ -5208,6 +5205,7 @@ WaitForChar(msec) * When a GUI is being used, this will not be used for input -- webb * Returns also, when a request from Sniff is waiting -- toni. * Or when a Linux GPM mouse event is waiting. + * Or when a clientserver message is on the queue. */ #if defined(__BEOS__) int @@ -5601,6 +5599,11 @@ select_eintr: if (finished || msec == 0) break; +# ifdef FEAT_CLIENTSERVER + if (server_waiting()) + break; +# endif + /* We're going to loop around again, find out for how long */ if (msec > 0) { @@ -7106,31 +7109,31 @@ xterm_update() for (;;) { - XtInputMask mask = XtAppPending(app_context); + XtInputMask mask = XtAppPending(app_context); - if (mask == 0 || vim_is_input_buf_full()) + if (mask == 0 || vim_is_input_buf_full()) break; - if (mask & XtIMXEvent) + if (mask & XtIMXEvent) { /* There is an event to process. */ - XtAppNextEvent(app_context, &event); + 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); + serverEventProc(xterm_dpy, &event, 0); } #endif - XtDispatchEvent(&event); - } + XtDispatchEvent(&event); + } else { /* There is something else than an event to process. */ - XtAppProcessEvent(app_context, mask); - } + XtAppProcessEvent(app_context, mask); + } } } |