diff src/testdir/test_cmdline.vim @ 24739:68e3adbeaf20 v8.2.2908

patch 8.2.2908: crash when using a terminal popup window from cmdline window Commit: https://github.com/vim/vim/commit/e5b4486c4279a9674a9bb76130b4db53fb9303a0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 30 13:54:03 2021 +0200 patch 8.2.2908: crash when using a terminal popup window from cmdline window Problem: Crash when using a terminal popup window from the cmdline window. Solution: Instead of checking cmdwin_type call cmdwin_is_active(). (closes #8286)
author Bram Moolenaar <Bram@vim.org>
date Sun, 30 May 2021 14:00:05 +0200
parents a6e43da449af
children a2a789bffa9c
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -1192,6 +1192,20 @@ func Test_cmdwin_restore()
   call delete('XTest_restore')
 endfunc
 
+func Test_cmdwin_no_terminal()
+  CheckFeature cmdwin
+  CheckFeature terminal
+
+  let buf = RunVimInTerminal('', {'rows': 12})
+  call TermWait(buf, 50)
+  call term_sendkeys(buf, ":set cmdheight=2\<CR>")
+  call term_sendkeys(buf, "q:")
+  call term_sendkeys(buf, ":let buf = term_start(['/bin/echo'], #{hidden: 1})\<CR>")
+  call VerifyScreenDump(buf, 'Test_cmdwin_no_terminal', {})
+  call term_sendkeys(buf, ":q\<CR>")
+  call StopVimInTerminal(buf)
+endfunc
+
 func Test_buffers_lastused()
   " check that buffers are sorted by time when wildmode has lastused
   call test_settime(1550020000)	  " middle