diff --git a/test/old/testdir/test_statusline.vim b/test/old/testdir/test_statusline.vim index 75b5d4be91..9685d42790 100644 --- a/test/old/testdir/test_statusline.vim +++ b/test/old/testdir/test_statusline.vim @@ -16,11 +16,15 @@ func TearDown() endfunc func s:get_statusline() + redraw! if has('gui_running') - redraw! sleep 1m endif - return ScreenLines(&lines - 1, &columns)[0] + " Read the screen directly after redraw! instead of going through + " ScreenLines(), whose own redraw! may process events and change the window + " layout between here and the screenstring() calls. + let row = &lines - 1 + return join(map(range(1, &columns), 'screenstring(row, v:val)'), '') endfunc func StatuslineWithCaughtError()