From b315876efa7865486b9cc160d43f0ead47e58d6c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 2 Nov 2017 17:50:14 +0100 Subject: [PATCH] patch 8.0.1246: popup test has an arbitrary delay Problem: Popup test has an arbitrary delay. Solution: Wait for the ruler to show. (James McCoy) --- src/testdir/test_popup.vim | 10 +++++++--- src/version.c | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 2781aabcd..281836cec 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -637,9 +637,13 @@ func Test_popup_and_window_resize() if h < 15 return endif - let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3}) - call term_sendkeys(g:buf, (h / 3 - 1)."o\") - call term_wait(g:buf, 500) + let rows = h / 3 + let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': rows}) + call term_sendkeys(g:buf, (h / 3 - 1) . "o\") + " Wait for the nested Vim to exit insert mode, where it will show the ruler. + " Need to trigger a redraw. + call WaitFor(printf('execute("redraw") == "" && term_getline(g:buf, %d) =~ "\\<%d,.*Bot"', rows, rows)) + call term_sendkeys(g:buf, "Gi\") call term_sendkeys(g:buf, "\") call term_wait(g:buf, 100) diff --git a/src/version.c b/src/version.c index 523021226..fabb4d9b7 100644 --- a/src/version.c +++ b/src/version.c @@ -761,6 +761,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1246, /**/ 1245, /**/ -- 2.50.1