Răsfoiți Sursa

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.
devlinzed 7 ani în urmă
părinte
comite
556bf1d507
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      autoload/startify.vim

+ 1 - 1
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