1
0
forked from aniani/vim

patch 8.2.1959: crash when terminal buffer name is made empty

Problem:    Crash when terminal buffer name is made empty. (Dhiraj Mishra)
Solution:   Fall back to "[No Name]". (closes #7262)
This commit is contained in:
Bram Moolenaar
2020-11-05 19:36:38 +01:00
parent b885b435d1
commit 00806bceb6
5 changed files with 30 additions and 4 deletions

View File

@@ -41,6 +41,16 @@ func Test_terminal_basic()
unlet g:job
endfunc
func Test_terminal_no_name()
let buf = Run_shell_in_terminal({})
call assert_match('^!', bufname(buf))
0file
call assert_equal("", bufname(buf))
call assert_match('\[No Name\]', execute('file'))
call StopShellInTerminal(buf)
call TermWait(buf)
endfunc
func Test_terminal_TerminalWinOpen()
au TerminalWinOpen * let b:done = 'yes'
let buf = Run_shell_in_terminal({})