aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-06-29 21:38:54 +0200
committerPeter Odding <peter@peterodding.com>2014-06-29 21:38:54 +0200
commit9c6b3f970100cefc4ede2dc69aa482633786579f (patch)
treec79482f61b6ec659802bc1c8648ea784fd337583 /autoload
parentac9f93f49c2ee327c7514fc62501c528f7dc48cf (diff)
parent74f5ca5f12adf1ab2d294aacb2ce5fb216938ac7 (diff)
downloadvim-easytags-9c6b3f970100cefc4ede2dc69aa482633786579f.tar.gz
Merge pull request #87: Avoid error about empty Dictionary key
Diffstat (limited to 'autoload')
-rw-r--r--autoload/xolox/easytags/update.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/autoload/xolox/easytags/update.vim b/autoload/xolox/easytags/update.vim
index eca86c3..55ce8b6 100644
--- a/autoload/xolox/easytags/update.vim
+++ b/autoload/xolox/easytags/update.vim
@@ -1,6 +1,6 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: June 22, 2014
+" Last Change: June 29, 2014
" URL: http://peterodding.com/code/vim/easytags/
" This Vim auto-load script contains the parts of vim-easytags that are used
@@ -254,10 +254,13 @@ endfunction
function! s:create_cache() " {{{1
let cache = {'canonicalize_cache': {}, 'exists_cache': {}}
function cache.canonicalize(pathname) dict
- if !has_key(self, a:pathname)
- let self[a:pathname] = xolox#easytags#utils#canonicalize(a:pathname)
+ if !empty(a:pathname)
+ if !has_key(self, a:pathname)
+ let self[a:pathname] = xolox#easytags#utils#canonicalize(a:pathname)
+ endif
+ return self[a:pathname]
endif
- return self[a:pathname]
+ return ''
endfunction
function cache.exists(pathname) dict
if !has_key(self, a:pathname)