Skip to content

Commit b315876

Browse files
committed
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)
1 parent 3e1c617 commit b315876

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/testdir/test_popup.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,13 @@ func Test_popup_and_window_resize()
637637
if h < 15
638638
return
639639
endif
640-
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
641-
call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>")
642-
call term_wait(g:buf, 500)
640+
let rows = h / 3
641+
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': rows})
642+
call term_sendkeys(g:buf, (h / 3 - 1) . "o\<esc>")
643+
" Wait for the nested Vim to exit insert mode, where it will show the ruler.
644+
" Need to trigger a redraw.
645+
call WaitFor(printf('execute("redraw") == "" && term_getline(g:buf, %d) =~ "\\<%d,.*Bot"', rows, rows))
646+
643647
call term_sendkeys(g:buf, "Gi\<c-x>")
644648
call term_sendkeys(g:buf, "\<c-v>")
645649
call term_wait(g:buf, 100)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1246,
764766
/**/
765767
1245,
766768
/**/

0 commit comments

Comments
 (0)