Skip to content

Commit 0353f56

Browse files
committed
patch 8.2.2154: popupwin test for terminal buffer fails sometimes
Problem: Popupwin test for terminal buffer fails sometimes. Solution: Wait for the prompt to appear.
1 parent b125b53 commit 0353f56

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/testdir/test_popupwin.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,13 +2673,14 @@ func Test_popupwin_terminal_buffer()
26732673

26742674
let termbuf = term_start(&shell, #{hidden: 1})
26752675
let winid = popup_create(termbuf, #{minwidth: 40, minheight: 10, border: []})
2676-
" Wait for shell to start and show a prompt
2676+
" Wait for shell to start
26772677
call WaitForAssert({-> assert_equal("run", job_status(term_getjob(termbuf)))})
2678-
sleep 20m
2678+
" Wait for a prompt (see border char first, then space after prompt)
2679+
call WaitForAssert({ -> assert_equal(' ', screenstring(screenrow(), screencol() - 1))})
26792680

26802681
" When typing a character, the cursor is after it.
26812682
call feedkeys("x", 'xt')
2682-
sleep 10m
2683+
call term_wait(termbuf)
26832684
redraw
26842685
call WaitForAssert({ -> assert_equal('x', screenstring(screenrow(), screencol() - 1))})
26852686
call feedkeys("\<BS>", 'xt')

src/version.c

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

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2154,
753755
/**/
754756
2153,
755757
/**/

0 commit comments

Comments
 (0)