Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix for "E713: Cannot use empty key for Dictionary" (issue #16)

  • Loading branch information...
commit f38bcf6e2deb821d94dac3609aaa3ffc79d01f8c 1 parent 8a186f4
Peter Odding authored
Showing with 19 additions and 11 deletions.
  1. +19 −11 autoload/xolox/easytags.vim
30 autoload/xolox/easytags.vim
View
@@ -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 = {}
Please sign in to comment.
Something went wrong with that request. Please try again.