diff src/os_win32.c @ 10418:56cb9538386c v8.0.0103

commit https://github.com/vim/vim/commit/8a8199e4a1814b10630a770165502abb1121cd1b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 26 15:13:33 2016 +0100 patch 8.0.0103 Problem: May not process channel readahead. (skywind) Solution: If there is readahead don't block on input.
author Christian Brabandt <cb@256bit.org>
date Sat, 26 Nov 2016 15:15:03 +0100
parents 42911b233245
children b726d3ea70bc
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1351,9 +1351,15 @@ WaitForChar(long msec)
 	    DWORD dwWaitTime = dwEndTime - dwNow;
 
 #ifdef FEAT_JOB_CHANNEL
-	    /* Check channel while waiting input. */
+	    /* Check channel while waiting for input. */
 	    if (dwWaitTime > 100)
+	    {
 		dwWaitTime = 100;
+		/* If there is readahead then parse_queued_messages() timed out
+		 * and we should call it again soon. */
+		if (channel_any_readahead())
+		    dwWaitTime = 10;
+	    }
 #endif
 #ifdef FEAT_MZSCHEME
 	    if (mzthreads_allowed() && p_mzq > 0