diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-02 17:50:14 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-02 17:50:14 +0100 |
commit | b315876efa7865486b9cc160d43f0ead47e58d6c (patch) | |
tree | 8ffe67b36cc8d5d8c0a977f346c6d266f877ea0e /src/testdir/test_popup.vim | |
parent | 3e1c617d49224038a820ee2c552ebe31a84aaa89 (diff) |
patch 8.0.1246: popup test has an arbitrary delayv8.0.1246
Problem: Popup test has an arbitrary delay.
Solution: Wait for the ruler to show. (James McCoy)
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r-- | src/testdir/test_popup.vim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 2781aabcd3..281836cec6 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\<esc>") - 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\<esc>") + " 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\<c-x>") call term_sendkeys(g:buf, "\<c-v>") call term_wait(g:buf, 100) |