]> granicus.if.org Git - vim/commitdiff
patch 8.2.1998: terminal Cmd test sometimes fails to close popup v8.2.1998
authorBram Moolenaar <Bram@vim.org>
Mon, 16 Nov 2020 20:02:28 +0000 (21:02 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 16 Nov 2020 20:02:28 +0000 (21:02 +0100)
Problem:    Terminal Cmd test sometimes fails to close popup.
Solution:   Add "term_finish" option.

src/testdir/test_terminal.vim
src/version.c

index 735164780c47ab0edf656805371e6c8957778d7e..846ec5986eb32d8356753ce2e6ab1711f63c1036 100644 (file)
@@ -1259,15 +1259,14 @@ func Test_terminal_popup_insert_cmd()
 
   inoremap <F3> <Cmd>call StartTermInPopup()<CR>
   func StartTermInPopup()
-    call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true})->popup_create(#{highlight: 'Pmenu'})
+    call term_start(['/bin/sh', '-c', 'cat'], #{hidden: v:true, term_finish: 'close'})->popup_create(#{highlight: 'Pmenu'})
   endfunc
   call feedkeys("i\<F3>")
   sleep 10m
   call assert_equal('n', mode())
 
   call feedkeys("\<C-D>", 'xt')
-  sleep 20m
-  call feedkeys(":q\<CR>", 'xt')
+  sleep 50m
   delfunc StartTermInPopup
   iunmap <F3>
 endfunc
index 0e9973e0971b8043f73a2333b6898584fe309e1e..186bbdea63496de8fd847157d2381217c085dfbb 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1998,
 /**/
     1997,
 /**/