Skip to content

Commit 37bb030

Browse files
committed
patch 8.2.0462: previewwindow test fails on some systems
Problem: Previewwindow test fails on some systems. (James McCoy) Solution: Wait a bit after sending the "o". (closes #5849)
1 parent 9207d1f commit 37bb030

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/testdir/dumps/Test_popup_and_previewwindow_01.dump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
|a+0#0000001#ffd7ff255|b|6| @11| +0#0000000#a8a8a8255| +0&#ffffff0@58
1717
|a|b|0> @71
1818
|~+0#4040ff13&| @73
19-
|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1|0|,|1| @10|B|o|t
19+
|[+3#0000000&|N|o| |N|a|m|e|]| |[|+|]| @43|1@1|,|1| @10|B|o|t
2020
|-+2&&@1| |K|e|y|w|o|r|d| |L|o|c|a|l| |c|o|m|p|l|e|t|i|o|n| |(|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |1|0| +0#0000000&@26

src/testdir/test_popup.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,15 +743,19 @@ func Test_popup_and_previewwindow_dump()
743743
let lines =<< trim END
744744
set previewheight=9
745745
silent! pedit
746-
call setline(1, map(repeat(["ab"], 10), "v:val. v:key"))
746+
call setline(1, map(repeat(["ab"], 10), "v:val .. v:key"))
747747
exec "norm! G\<C-E>\<C-E>"
748748
END
749749
call writefile(lines, 'Xscript')
750750
let buf = RunVimInTerminal('-S Xscript', {})
751751

752+
" wait for the script to finish
753+
call term_wait(buf)
754+
752755
" Test that popup and previewwindow do not overlap.
753-
call term_sendkeys(buf, "o\<C-X>\<C-N>")
754-
sleep 100m
756+
call term_sendkeys(buf, "o")
757+
call term_wait(buf, 100)
758+
call term_sendkeys(buf, "\<C-X>\<C-N>")
755759
call VerifyScreenDump(buf, 'Test_popup_and_previewwindow_01', {})
756760

757761
call term_sendkeys(buf, "\<Esc>u")

src/version.c

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

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
462,
741743
/**/
742744
461,
743745
/**/

0 commit comments

Comments
 (0)