From 556bf1d507dfaddfba4b5795716ea20f8ba902ac Mon Sep 17 00:00:00 2001 From: devlinzed Date: Tue, 2 Oct 2018 15:45:05 -0400 Subject: [PATCH] Avoid extra spaces added to custom quotes (#336) Without copying the array returned from `s:set_custom_section()`, repeated invocations may lead to accidental mutation of its arguments, such as adding extra spaces to custom header and footer quotes. --- autoload/startify.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 38ffbce..92589af 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -514,7 +514,7 @@ endfunction " Function: s:set_custom_section {{{1 function! s:set_custom_section(section) abort if type(a:section) == type([]) - return a:section + return copy(a:section) elseif type(a:section) == type('') return empty(a:section) ? [] : eval(a:section) endif