aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-01 11:28:30 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-01 11:28:48 -0400
commit8495e502738db9571a6ce326f10303bb5465c03a (patch)
treea5aa8001931a1a298baefb4f82e0b21a125d217c
parent8e1adedb263f0aa8ecf7e894b3e3697cad3e543d (diff)
downloadrneovim-8495e502738db9571a6ce326f10303bb5465c03a.tar.gz
rneovim-8495e502738db9571a6ce326f10303bb5465c03a.tar.bz2
rneovim-8495e502738db9571a6ce326f10303bb5465c03a.zip
vim-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) https://github.com/vim/vim/commit/b315876efa7865486b9cc160d43f0ead47e58d6c
-rw-r--r--src/nvim/testdir/test_popup.vim10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim
index e6594d4581..098f2881f2 100644
--- a/src/nvim/testdir/test_popup.vim
+++ b/src/nvim/testdir/test_popup.vim
@@ -669,9 +669,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)