Mercurial > vim
changeset 12736:4ca72d1ed7f0 v8.0.1246
patch 8.0.1246: popup test has an arbitrary delay
commit https://github.com/vim/vim/commit/b315876efa7865486b9cc160d43f0ead47e58d6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 17:50:14 2017 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 18:00:04 +0100 |
parents | 32d8f47598b1 |
children | 3b05a0df1fe5 |
files | src/testdir/test_popup.vim src/version.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)