diff src/testdir/test_autocmd.vim @ 13559:af68603e213d v8.0.1653

patch 8.0.1653: screen dump is made too soon commit https://github.com/vim/vim/commit/1834d37396e046ccbc4aa2678ba16a38197da6b4 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 29 17:40:46 2018 +0200 patch 8.0.1653: screen dump is made too soon Problem: Screen dump is made too soon. Solution: Wait until the ruler is displayed. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2755)
author Christian Brabandt <cb@256bit.org>
date Thu, 29 Mar 2018 17:45:07 +0200
parents 4a44c90dd671
children 7d2039b2ecc8
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -1315,6 +1315,8 @@ func Test_Changed_FirstTime()
   call writefile([''], 'Xchanged.txt')
   let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})
   call assert_equal('running', term_getstatus(buf))
+  " Wait for the ruler (in the status line) to be shown.
+  call WaitFor({-> term_getline(buf, 3) =~# '\<All$'})
   " It's only adding autocmd, so that no event occurs.
   call term_sendkeys(buf, ":au! TextChanged <buffer> call writefile(['No'], 'Xchanged.txt')\<cr>")
   call term_sendkeys(buf, "\<C-\\>\<C-N>:qa!\<cr>")