From 6b4937d312d0cdd2401d8e26e56f754495bd3660 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sun, 29 Jun 2014 21:42:04 +0200 Subject: Bug fix for invalid tags filtering (cache.exists() was broken, now fixed) --- autoload/xolox/easytags/update.vim | 16 +++++++++++----- 1 file 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 -- cgit v1.2.3