diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-23 19:34:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-23 19:34:01 +0100 |
commit | 9186a276222ea8a7c88f4092ac5b4201381f4e20 (patch) | |
tree | a1c29ae0fae907a1746b99a7bbfcf0ae244cd8c2 /src/gui_w32.c | |
parent | 0106e3d0bf8a38351af45331cbf3b9172a6bb90b (diff) |
patch 7.4.1404v7.4.1404
Problem: ch_read() doesn't time out on MS-Windows.
Solution: Instead of WM_NETBEANS use select(). (Yukihiro Nakadaira)
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index 3a64691493..edfe24e560 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1927,24 +1927,6 @@ process_message(void) } #endif -#ifdef FEAT_CHANNEL - if (msg.message == WM_NETBEANS) - { - int part; - channel_T *channel = channel_fd2channel((sock_T)msg.wParam, &part); - - if (channel != NULL) - { - /* Disable error messages, they can mess up the display and throw - * an exception. */ - ++emsg_off; - channel_read(channel, part, "process_message"); - --emsg_off; - } - return; - } -#endif - #ifdef FEAT_SNIFF if (sniff_request_waiting && want_sniff_request) { @@ -2245,7 +2227,18 @@ gui_mch_wait_for_chars(int wtime) } #ifdef MESSAGE_QUEUE - parse_queued_messages(); + /* Check channel while waiting message. */ + for (;;) + { + MSG msg; + + parse_queued_messages(); + + if (pPeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) + || MsgWaitForMultipleObjects(0, NULL, FALSE, 100, QS_ALLEVENTS) + != WAIT_TIMEOUT) + break; + } #endif /* |