James McCoy wrote:
> On Tue, Oct 31, 2017 at 10:20:14PM +0100, Bram Moolenaar wrote:
> > *** ../vim-8.0.1240/src/testdir/test_popup.vim 2017-10-27
> > 01:34:55.093306847 +0200
> > --- src/testdir/test_popup.vim 2017-10-31 22:15:48.865608389 +0100
> > ***************
> > *** 639,645 ****
> > 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, 200)
> > call term_sendkeys(g:buf, "Gi\<c-x>")
> > call term_sendkeys(g:buf, "\<c-v>")
> > call term_wait(g:buf, 100)
> > --- 639,645 ----
> > 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)
>
> Wouldn't something more deterministic be better? How about this?
>
> diff --git i/src/testdir/test_popup.vim w/src/testdir/test_popup.vim
> index 2781aabcd..a4bed18d9 100644
> --- i/src/testdir/test_popup.vim
> +++ w/src/testdir/test_popup.vim
> @@ -639,7 +639,8 @@ func Test_popup_and_window_resize()
> 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)
> + " Wait for the nested Vim to exit insert mode, where it will show the ruler
> + call WaitFor(printf('term_getline(g:buf, %d) =~ "\<%d,1\>"', h, h / 3))
> call term_sendkeys(g:buf, "Gi\<c-x>")
> call term_sendkeys(g:buf, "\<c-v>")
> call term_wait(g:buf, 100)
That's defenitely better than an arbitrary delay. However, I think your
check just never matches and causes a delay of one second.
--
Sorry, no fortune today.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.