comparison src/testdir/test_termcodes.vim @ 23029:bc3a083b50cb v8.2.2061

patch 8.2.2061: Vim9: E1030 error when using empty string for term_sendkeys() Commit: https://github.com/vim/vim/commit/4d05af0a64c2e26b13d2ad571debbf5f3b6d384e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 27 20:55:00 2020 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Fri, 27 Nov 2020 21:00:04 +0100
parents d03221aa54f3
children 5fbac68bda23
comparison
equal deleted inserted replaced
23028:39294d54c929 23029:bc3a083b50cb
1894 set ttybuiltin 1894 set ttybuiltin
1895 endfunc 1895 endfunc
1896 1896
1897 func Test_list_builtin_terminals() 1897 func Test_list_builtin_terminals()
1898 CheckRunVimInTerminal 1898 CheckRunVimInTerminal
1899 let buf = RunVimInTerminal('', #{rows: 14}) 1899 call RunVimInTerminal('', #{rows: 14})
1900 call term_sendkeys(buf, ":set cmdheight=3\<CR>") 1900 call term_sendkeys('', ":set cmdheight=3\<CR>")
1901 call TermWait(buf, 100) 1901 call TermWait('', 100)
1902 call term_sendkeys(buf, ":set term=xxx\<CR>") 1902 call term_sendkeys('', ":set term=xxx\<CR>")
1903 call TermWait(buf, 100) 1903 call TermWait('', 100)
1904 call assert_match('builtin_dumb', term_getline(buf, 11)) 1904 call assert_match('builtin_dumb', term_getline('', 11))
1905 call assert_match('Not found in termcap', term_getline(buf, 12)) 1905 call assert_match('Not found in termcap', term_getline('', 12))
1906 call StopVimInTerminal(buf) 1906 call StopVimInTerminal('')
1907 endfunc 1907 endfunc
1908 1908
1909 func GetEscCodeCSI27(key, modifier) 1909 func GetEscCodeCSI27(key, modifier)
1910 let key = printf("%d", char2nr(a:key)) 1910 let key = printf("%d", char2nr(a:key))
1911 let mod = printf("%d", a:modifier) 1911 let mod = printf("%d", a:modifier)