Skip to content

Commit

Permalink
BUG: Avoid E713 when attempting fingerprinting without current file.
Browse files Browse the repository at this point in the history
When creating a tags file for an entire directory, the a:cfile variable is empty. In that case, the cache doesn't work. Avoid "E713: Cannot use empty key for Dictionary" by checking for that.
  • Loading branch information
inkarkat committed Apr 17, 2013
1 parent d789e8e commit 92d1f2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autoload/xolox/easytags.vim
Expand Up @@ -222,6 +222,11 @@ endif

let s:fingerprints = {}
function! s:has_updates(cfile, output)
if empty(a:cfile)
" The cache doesn't work when tags aren't created for the current file.
return 1
endif

let fingerprint = s:get_fingerprint(a:cfile, a:output)
if ! empty(fingerprint) && get(s:fingerprints, a:cfile, '') ==# fingerprint
return 0
Expand Down

0 comments on commit 92d1f2d

Please sign in to comment.