From ca03433196118e19904b4fcf1f3d336e4fab4e92 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 26 Apr 2018 13:15:01 +0200 Subject: [PATCH] Make g:startify_custom_header handle empty string eval() throws errors on empty strings. --- autoload/startify.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 0f7c8f2..2bb3952 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -86,7 +86,9 @@ function! startify#insane_in_the_membrane() abort if type(g:startify_custom_header) == type([]) let g:startify_header = copy(g:startify_custom_header) elseif type(g:startify_custom_header) == type('') - let g:startify_header = eval(g:startify_custom_header) + let g:startify_header = empty(g:startify_custom_header) + \ ? [] + \ : eval(g:startify_custom_header) else echomsg 'startify: wrong type of value for g:startify_custom_header' let g:startify_header = startify#fortune#cowsay()