Permalink
Browse files

BUG: Avoid E713 when attempting fingerprinting without current file.

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...
1 parent d789e8e commit 92d1f2de0ff4d5e51f450f5fcca5fbecc09b67d6 @inkarkat inkarkat committed Apr 17, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 autoload/xolox/easytags.vim
@@ -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

0 comments on commit 92d1f2d

Please sign in to comment.