diff options
author | Peter Odding <peter@peterodding.com> | 2011-09-04 13:33:32 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2011-09-04 13:33:32 +0200 |
commit | f38bcf6e2deb821d94dac3609aaa3ffc79d01f8c (patch) | |
tree | ef5b2dffc9ba47a3b14206b8991c99a4fd92c73e /autoload | |
parent | 8a186f47967ef1e6eb7dae272c6722ab1494f678 (diff) | |
download | vim-easytags-f38bcf6e2deb821d94dac3609aaa3ffc79d01f8c.tar.gz |
Bug fix for "E713: Cannot use empty key for Dictionary" (issue #16)
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/xolox/easytags.vim | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index d859e4e..f077dbc 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -1,9 +1,9 @@ " Vim script " Author: Peter Odding <peter@peterodding.com> -" Last Change: August 31, 2011 +" Last Change: September 4, 2011 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '2.5' +let g:xolox#easytags#version = '2.5.1' " Public interface through (automatic) commands. {{{1 @@ -243,8 +243,10 @@ function! s:find_tagged_files(entries) " {{{3 let tagged_files = {} for entry in a:entries let filename = s:canonicalize(entry[1]) - if !has_key(tagged_files, filename) - let tagged_files[filename] = 1 + if filename != '' + if !has_key(tagged_files, filename) + let tagged_files[filename] = 1 + endif endif endfor return tagged_files @@ -512,7 +514,10 @@ endfunction function! s:cache_tagged_files_in(fname, ftime, entries) " {{{3 for entry in a:entries - let s:tagged_files[s:canonicalize(entry[1])] = 1 + let filename = s:canonicalize(entry[1]) + if filename != '' + let s:tagged_files[filename] = 1 + endif endfor let s:known_tagfiles[a:fname] = a:ftime endfunction @@ -607,13 +612,16 @@ function! s:resolve(filename) " {{{2 endfunction function! s:canonicalize(filename) " {{{2 - if has_key(s:cached_filenames, a:filename) - return s:cached_filenames[a:filename] - endif - let canonical = s:resolve(fnamemodify(a:filename, ':p')) - let s:cached_filenames[a:filename] = canonical - return canonical + if a:filename != '' + if has_key(s:cached_filenames, a:filename) + return s:cached_filenames[a:filename] + endif + let canonical = s:resolve(fnamemodify(a:filename, ':p')) + let s:cached_filenames[a:filename] = canonical + return canonical + endif endif + return '' endfunction let s:cached_filenames = {} |