From a33746005f22b743d2c4a1ec8e2c836405f2436f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 9 May 2020 16:56:09 +1200 Subject: Make copies for map(), filter(), and reverse() I really should have remembered this. Caused broken 'thesaurus' entries, in this case. --- vim/vimrc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index d60d66fd..09a31c42 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Mon, 04 May 2020 00:51:58 UTC +" Last updated: Sat, 09 May 2020 04:48:24 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -118,10 +118,12 @@ if xdg#['config']['home'] !=# '' endif if !empty(s:xdgconfigpaths) execute 'set runtimepath^='.option#Escape(join(map( - \ s:xdgconfigpaths, 'option#item#Escape(v:val)' + \ copy(s:xdgconfigpaths), + \ 'option#item#Escape(v:val)' \), ',')) execute 'set runtimepath+='.option#Escape(join(map( - \ reverse(s:xdgconfigpaths), 'option#item#Escape(v:val."/after")' + \ reverse(copy(s:xdgconfigpaths)), + \ 'option#item#Escape(v:val.''/after'')' \), ',')) endif unlet s:xdgconfigpaths @@ -419,10 +421,12 @@ endif if !empty(s:refdirs) try execute 'set dictionary^='.option#Escape(join(map( - \ s:refdirs, 'option#item#Escape(v:val."/dictionary.txt")' + \ copy(s:refdirs), + \ 'option#item#Escape(v:val.''/dictionary.txt'')' \), ',')) execute 'set thesaurus^='.option#Escape(join(map( - \ s:refdirs, 'option#item#Escape(v:val."/thesaurus.txt")' + \ copy(s:refdirs), + \ 'option#item#Escape(v:val.''/thesaurus.txt'')' \), ',')) catch /^Vim\%((\a\+)\)\=:E474:/ endtry -- cgit v1.2.3