On Wed, Nov 01, 2017 at 09:22:45PM +0100, Bram Moolenaar wrote:
> That's defenitely better than an arbitrary delay.  However, I think your
> check just never matches and causes a delay of one second.

That's surprising that WaitFor() silently fails, but you are right.  I
tested this patch and it does work:

diff --git i/src/testdir/test_popup.vim w/src/testdir/test_popup.vim
index 2781aabcd..0746efc7f 100644
--- i/src/testdir/test_popup.vim
+++ w/src/testdir/test_popup.vim
@@ -637,9 +637,11 @@ 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})
+  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>")
-  call term_wait(g:buf, 500)
+  " Wait for the nested Vim to exit insert mode, where it will show the ruler
+  call WaitFor(printf('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)

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui