0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 8.1.0804: crash when setting v:errmsg to empty list

Problem:    Crash when setting v:errmsg to empty list. (Jaon Franklin)
Solution:   Separate getting value and assigning result.
This commit is contained in:
Bram Moolenaar
2019-01-24 13:58:11 +01:00
parent ad36a3588d
commit 4b9e91f0ba
3 changed files with 18 additions and 2 deletions

View File

@@ -87,3 +87,10 @@ func Test_readfile_binary()
bwipe!
call delete('XReadfile')
endfunc
func Test_let_errmsg()
call assert_fails('let v:errmsg = []', 'E730:')
let v:errmsg = ''
call assert_fails('let v:errmsg = []', 'E730:')
let v:errmsg = ''
endfunc