diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-01 21:32:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-01 21:32:58 +0100 |
commit | ca568aeec60dd6cc13b4dcf5cec0e0a07113547f (patch) | |
tree | 364d1ab21ef400812c0f2a5be6974eea6a5ab68e | |
parent | fb1f62691eae7c79a28b3b17a60e72ce198c71a2 (diff) | |
download | vim-git-ca568aeec60dd6cc13b4dcf5cec0e0a07113547f.tar.gz |
patch 7.4.1230v7.4.1230
Problem: Win32: opening a channel may hang. Not checking for messages
while waiting for characters.
Solution: Add a zero timeout. Call parse_queued_messages(). (Yasuhiro
Matsumoto)
-rw-r--r-- | src/os_win32.c | 10 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index 9fa806e73..fb1367188 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -1461,10 +1461,12 @@ WaitForChar(long msec) */ for (;;) { +#ifdef MESSAGE_QUEUE + parse_queued_messages(); +#endif #ifdef FEAT_MZSCHEME mzvim_check_threads(); #endif - #ifdef FEAT_CLIENTSERVER serverProcessPendingMessages(); #endif @@ -1474,7 +1476,11 @@ WaitForChar(long msec) maxfd = channel_select_setup(-1, &rfds); if (maxfd >= 0) { - ret = select(maxfd + 1, &rfds, NULL, NULL, NULL); + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = 0; + ret = select(maxfd + 1, &rfds, NULL, NULL, &tv); if (ret > 0 && channel_select_check(ret, &rfds) > 0) return TRUE; } diff --git a/src/version.c b/src/version.c index 1c9cbf51b..61d122c4d 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1230, +/**/ 1229, /**/ 1228, |