comparison src/os_mswin.c @ 11187:515db00c4676 v8.0.0480

patch 8.0.0480: the remote_peek() test fails on MS-Windows commit https://github.com/vim/vim/commit/15e737f768542fcc516296b5c158e14cc7ba7feb Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 18 21:22:47 2017 +0100 patch 8.0.0480: the remote_peek() test fails on MS-Windows Problem: The remote_peek() test fails on MS-Windows. Solution: Check for pending messages. Also report errors in the first run if a flaky test fails twice.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Mar 2017 21:30:04 +0100
parents 13544aa85dc0
children 71311d899b42
comparison
equal deleted inserted replaced
11186:b924ba6a4bbc 11187:515db00c4676
2524 serverGetReply(HWND server, int *expr_res, int remove, int wait) 2524 serverGetReply(HWND server, int *expr_res, int remove, int wait)
2525 { 2525 {
2526 int i; 2526 int i;
2527 char_u *reply; 2527 char_u *reply;
2528 reply_T *rep; 2528 reply_T *rep;
2529 int did_process = FALSE;
2529 2530
2530 /* When waiting, loop until the message waiting for is received. */ 2531 /* When waiting, loop until the message waiting for is received. */
2531 for (;;) 2532 for (;;)
2532 { 2533 {
2533 /* Reset this here, in case a message arrives while we are going 2534 /* Reset this here, in case a message arrives while we are going
2560 } 2561 }
2561 2562
2562 /* If we got here, we didn't find a reply. Return immediately if the 2563 /* If we got here, we didn't find a reply. Return immediately if the
2563 * "wait" parameter isn't set. */ 2564 * "wait" parameter isn't set. */
2564 if (!wait) 2565 if (!wait)
2566 {
2567 /* Process pending messages once. Without this, looping on
2568 * remote_peek() would never get the reply. */
2569 if (!did_process)
2570 {
2571 did_process = TRUE;
2572 serverProcessPendingMessages();
2573 continue;
2574 }
2565 break; 2575 break;
2576 }
2566 2577
2567 /* We need to wait for a reply. Enter a message loop until the 2578 /* We need to wait for a reply. Enter a message loop until the
2568 * "reply_received" flag gets set. */ 2579 * "reply_received" flag gets set. */
2569 2580
2570 /* Loop until we receive a reply */ 2581 /* Loop until we receive a reply */