0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-03-18 21:22:47 +01:00
parent 6caf606b14
commit 15e737f768
3 changed files with 22 additions and 0 deletions

View File

@@ -2526,6 +2526,7 @@ serverGetReply(HWND server, int *expr_res, int remove, int wait)
int i;
char_u *reply;
reply_T *rep;
int did_process = FALSE;
/* When waiting, loop until the message waiting for is received. */
for (;;)
@@ -2562,7 +2563,17 @@ serverGetReply(HWND server, int *expr_res, int remove, int wait)
/* If we got here, we didn't find a reply. Return immediately if the
* "wait" parameter isn't set. */
if (!wait)
{
/* Process pending messages once. Without this, looping on
* remote_peek() would never get the reply. */
if (!did_process)
{
did_process = TRUE;
serverProcessPendingMessages();
continue;
}
break;
}
/* We need to wait for a reply. Enter a message loop until the
* "reply_received" flag gets set. */