aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-03 01:51:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-03 01:51:47 +1200
commitfc7fb091736f97fe0cea18562d94454b3a865380 (patch)
treecd97adfebafc488e18db36cbe954edbbd203bc74
parentImprove "absolute path" check for XDG base dirs (diff)
downloaddotfiles-fc7fb091736f97fe0cea18562d94454b3a865380.tar.gz
dotfiles-fc7fb091736f97fe0cea18562d94454b3a865380.zip
Tolerate unset iteration variables
-rw-r--r--vim/vimrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d34ce24d..3d5aef3a 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -118,7 +118,8 @@ for s:xdgruntimepath in reverse(s:xdgruntimepaths)
execute 'set runtimepath^='
\.option#Escape(option#item#Escape(s:xdgruntimepath))
endfor
-unlet s:xdgruntimepaths s:xdgruntimepath
+unlet! s:xdgruntimepath
+unlet s:xdgruntimepaths
" We need a command to reliably establish a full path, whether or not the
" directories already exist. We create a wrapper for the autoloaded function
@@ -411,7 +412,8 @@ try
execute 'set thesaurus^='
\.option#Escape(option#item#Escape(s:refdir.'/thesaurus.txt'))
endfor
- unlet s:refdirs s:refdir
+ unlet! s:refdir
+ unlet s:refdirs
catch /^Vim\%((\a\+)\)\=:E474:/
endtry