diff options
author | Ingo Karkat <swdev@ingo-karkat.de> | 2013-04-17 14:43:25 +0200 |
---|---|---|
committer | Ingo Karkat <swdev@ingo-karkat.de> | 2013-04-17 14:43:25 +0200 |
commit | 92d1f2de0ff4d5e51f450f5fcca5fbecc09b67d6 (patch) | |
tree | 15302b4b57b7cf9c3765091216552c9519629d25 | |
parent | d789e8e59d42d99a7c424961fc447e509d503aff (diff) | |
download | vim-easytags-92d1f2de0ff4d5e51f450f5fcca5fbecc09b67d6.tar.gz |
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.
-rw-r--r-- | autoload/xolox/easytags.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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 |