]> granicus.if.org Git - vim/commitdiff
patch 8.0.1246: popup test has an arbitrary delay v8.0.1246
authorBram Moolenaar <Bram@vim.org>
Thu, 2 Nov 2017 16:50:14 +0000 (17:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 2 Nov 2017 16:50:14 +0000 (17:50 +0100)
Problem:    Popup test has an arbitrary delay.
Solution:   Wait for the ruler to show. (James McCoy)

src/testdir/test_popup.vim
src/version.c

index 2781aabcd35ca70ab4d8ee5526f99cc6042bd5aa..281836cec61c9dcb743f3796858802394a22584f 100644 (file)
@@ -637,9 +637,13 @@ func Test_popup_and_window_resize()
   if h < 15
     return
   endif
-  let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': h / 3})
-  call term_sendkeys(g:buf, (h / 3 - 1)."o\<esc>")
-  call term_wait(g:buf, 500)
+  let rows = h / 3
+  let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': rows})
+  call term_sendkeys(g:buf, (h / 3 - 1) . "o\<esc>")
+  " Wait for the nested Vim to exit insert mode, where it will show the ruler.
+  " Need to trigger a redraw.
+  call WaitFor(printf('execute("redraw") == "" && term_getline(g:buf, %d) =~ "\\<%d,.*Bot"', rows, rows))
+
   call term_sendkeys(g:buf, "Gi\<c-x>")
   call term_sendkeys(g:buf, "\<c-v>")
   call term_wait(g:buf, 100)
index 52302122629a5476e0de4ac96dff73088c890c35..fabb4d9b751abd1a168bf404870df27856de4a1d 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1246,
 /**/
     1245,
 /**/