diff src/os_win32.c @ 14673:f1b7d308de2f v8.1.0349

patch 8.1.0349: crash when wiping buffer in a callback commit https://github.com/vim/vim/commit/ed5a9d661248a2160368f1b0ab3a1bf74831db04 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 6 13:14:43 2018 +0200 patch 8.1.0349: crash when wiping buffer in a callback Problem: Crash when wiping buffer in a callback. Solution: Do not handle messages when only peeking for a character. (closes #2107) Add "redraw_flag" to test_override().
author Christian Brabandt <cb@256bit.org>
date Thu, 06 Sep 2018 13:15:05 +0200
parents 99e45fab9d17
children 193471015e1a
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -1529,15 +1529,19 @@ WaitForChar(long msec, int ignore_input)
      */
     for (;;)
     {
+	// Only process messages when waiting.
+	if (msec != 0)
+	{
 #ifdef MESSAGE_QUEUE
-	parse_queued_messages();
+	    parse_queued_messages();
 #endif
 #ifdef FEAT_MZSCHEME
-	mzvim_check_threads();
+	    mzvim_check_threads();
 #endif
 #ifdef FEAT_CLIENTSERVER
-	serverProcessPendingMessages();
-#endif
+	    serverProcessPendingMessages();
+#endif
+	}
 
 	if (0
 #ifdef FEAT_MOUSE