Skip to content

Commit f52c383

Browse files
committed
patch 8.0.1165: popup test is still flaky
Problem: Popup test is still flaky. Solution: Add a term_wait() call. (Ozaki Kiichi)
1 parent 65ed136 commit f52c383

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/testdir/test_popup.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,20 +645,26 @@ func Test_popup_and_window_resize()
645645
endif
646646
let g:buf = term_start([$VIMPROG, '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
647647
call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>G")
648+
call term_wait(g:buf, 100)
648649
call term_sendkeys(g:buf, "i\<c-x>")
649650
call term_wait(g:buf, 100)
650651
call term_sendkeys(g:buf, "\<c-v>")
651652
call term_wait(g:buf, 100)
653+
" popup first entry "!" must be at the top
652654
call WaitFor('term_getline(g:buf, 1) =~ "^!"')
653655
call assert_match('^!\s*$', term_getline(g:buf, 1))
654656
exe 'resize +' . (h - 1)
655657
call term_wait(g:buf, 100)
656658
redraw!
659+
" popup shifted down, first line is now empty
657660
call WaitFor('term_getline(g:buf, 1) == ""')
658661
call assert_equal('', term_getline(g:buf, 1))
659662
sleep 100m
663+
" popup is below cursor line and shows first match "!"
660664
call WaitFor('term_getline(g:buf, term_getcursor(g:buf)[0] + 1) =~ "^!"')
661665
call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1))
666+
" cursor line also shows !
667+
call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0]))
662668
bwipe!
663669
endfunc
664670

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+
1165,
764766
/**/
765767
1164,
766768
/**/

0 commit comments

Comments
 (0)