Skip to content

Commit c54f347

Browse files
committed
patch 8.2.2648: terminal resize test sometimes hangs
Problem: Terminal resize test sometimes hangs. Solution: Wait for the shell to display a prompt and other output.
1 parent f4a2ed0 commit c54f347

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/testdir/test_terminal2.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,20 @@ func Test_terminal_resize()
246246
set statusline=x
247247
terminal
248248
call assert_equal(2, winnr('$'))
249+
let buf = bufnr()
250+
251+
" Wait for the shell to display a prompt
252+
call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))})
249253

250254
" Fill the terminal with text.
251255
if has('win32')
252256
call feedkeys("dir\<CR>", 'xt')
253257
else
254258
call feedkeys("ls\<CR>", 'xt')
255259
endif
260+
" Wait for some output
261+
call WaitForAssert({-> assert_notequal('', term_getline(buf, 3))})
262+
256263
" Go to Terminal-Normal mode for a moment.
257264
call feedkeys("\<C-W>N", 'xt')
258265
" Open a new window
@@ -263,6 +270,7 @@ func Test_terminal_resize()
263270
close
264271
call assert_equal(2, winnr('$'))
265272
call feedkeys("exit\<CR>", 'xt')
273+
call TermWait(buf)
266274
set statusline&
267275
endfunc
268276

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+
2648,
753755
/**/
754756
2647,
755757
/**/

0 commit comments

Comments
 (0)