@@ -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 100 m
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!
663669endfunc
664670
0 commit comments