From 92d1f2de0ff4d5e51f450f5fcca5fbecc09b67d6 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Wed, 17 Apr 2013 14:43:25 +0200 Subject: [PATCH] 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. --- autoload/xolox/easytags.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 0d6e857..4bbe379 100644 --- a/autoload/xolox/easytags.vim +++ b/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