patch 8.2.2061: Vim9: E1030 error when using empty string for term_sendkeys()
Problem: Vim9: E1030 error when using empty string for term_sendkeys().
Solution: Don't check for an invalid type unless the terminal can't be
found. (closes #7382)
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index cfbb7ba..12e4dd3 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -1896,14 +1896,14 @@
func Test_list_builtin_terminals()
CheckRunVimInTerminal
- let buf = RunVimInTerminal('', #{rows: 14})
- call term_sendkeys(buf, ":set cmdheight=3\<CR>")
- call TermWait(buf, 100)
- call term_sendkeys(buf, ":set term=xxx\<CR>")
- call TermWait(buf, 100)
- call assert_match('builtin_dumb', term_getline(buf, 11))
- call assert_match('Not found in termcap', term_getline(buf, 12))
- call StopVimInTerminal(buf)
+ call RunVimInTerminal('', #{rows: 14})
+ call term_sendkeys('', ":set cmdheight=3\<CR>")
+ call TermWait('', 100)
+ call term_sendkeys('', ":set term=xxx\<CR>")
+ call TermWait('', 100)
+ call assert_match('builtin_dumb', term_getline('', 11))
+ call assert_match('Not found in termcap', term_getline('', 12))
+ call StopVimInTerminal('')
endfunc
func GetEscCodeCSI27(key, modifier)