aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-06-29 21:42:04 +0200
committerPeter Odding <peter@peterodding.com>2014-06-29 21:42:04 +0200
commit6b4937d312d0cdd2401d8e26e56f754495bd3660 (patch)
tree80f5be3e4a8685dcaa1623931852579249bec684 /autoload
parent9c6b3f970100cefc4ede2dc69aa482633786579f (diff)
downloadvim-easytags-6b4937d312d0cdd2401d8e26e56f754495bd3660.tar.gz
Bug fix for invalid tags filtering (cache.exists() was broken, now fixed)
Diffstat (limited to 'autoload')
-rw-r--r--autoload/xolox/easytags/update.vim16
1 files changed, 11 insertions, 5 deletions
diff --git a/autoload/xolox/easytags/update.vim b/autoload/xolox/easytags/update.vim
index 55ce8b6..996d0fb 100644
--- a/autoload/xolox/easytags/update.vim
+++ b/autoload/xolox/easytags/update.vim
@@ -254,18 +254,24 @@ endfunction
function! s:create_cache() " {{{1
let cache = {'canonicalize_cache': {}, 'exists_cache': {}}
function cache.canonicalize(pathname) dict
+ let cache = self['canonicalize_cache']
if !empty(a:pathname)
- if !has_key(self, a:pathname)
- let self[a:pathname] = xolox#easytags#utils#canonicalize(a:pathname)
+ if !has_key(cache, a:pathname)
+ let cache[a:pathname] = xolox#easytags#utils#canonicalize(a:pathname)
endif
- return self[a:pathname]
+ return cache[a:pathname]
endif
return ''
endfunction
function cache.exists(pathname) dict
- if !has_key(self, a:pathname)
- let self[a:pathname] = filereadable(a:pathname)
+ let cache = self['exists_cache']
+ if !empty(a:pathname)
+ if !has_key(cache, a:pathname)
+ let cache[a:pathname] = filereadable(a:pathname)
+ endif
+ return cache[a:pathname]
endif
+ return 0
endfunction
return cache
endfunction