1
0
forked from aniani/vim

patch 7.4.1404

Problem:    ch_read() doesn't time out on MS-Windows.
Solution:   Instead of WM_NETBEANS use select(). (Yukihiro Nakadaira)
This commit is contained in:
Bram Moolenaar
2016-02-23 19:34:01 +01:00
parent 0106e3d0bf
commit 9186a27622
7 changed files with 33 additions and 88 deletions

View File

@@ -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
/*