Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix: Canonicalize arguments to :UpdateTags!

  • Loading branch information...
commit 5efb2c7ee0d6926aaa0ad3080a53857ec910d4d3 1 parent 0d0fac6
Peter Odding authored
Showing with 14 additions and 7 deletions.
  1. +13 −6 autoload.vim
  2. +1 −1  easytags.vim
19 autoload.vim
View
@@ -38,6 +38,7 @@ endfunction
function! easytags#update(silent, filter_tags, filenames) " {{{2
try
+ let s:cached_filenames = {}
let starttime = xolox#timer#start()
let cfile = s:check_cfile(a:silent, a:filter_tags, !empty(a:filenames))
let tagsfile = easytags#get_tagsfile()
@@ -60,6 +61,8 @@ function! easytags#update(silent, filter_tags, filenames) " {{{2
return 1
catch
call xolox#warning("%s: %s (at %s)", s:script, v:exception, v:throwpoint)
+ finally
+ unlet s:cached_filenames
endtry
endfunction
@@ -114,11 +117,17 @@ function! s:prep_cmdline(cfile, tagsfile, firstrun, arguments) " {{{3
endif
let have_args = 1
else
- for fname in a:arguments
- let matches = split(expand(fname), "\n")
- if !empty(matches)
- call extend(cmdline, map(matches, 'shellescape(v:val)'))
+ for arg in a:arguments
+ if arg =~ '^-'
+ call add(cmdline, arg)
let have_args = 1
+ else
+ let matches = split(expand(arg), "\n")
+ if !empty(matches)
+ call map(matches, 'shellescape(s:canonicalize(v:val))')
+ call extend(cmdline, matches)
+ let have_args = 1
+ endif
endif
endfor
endif
@@ -156,7 +165,6 @@ function! s:filter_merge_tags(filter_tags, tagsfile, output) " {{{3
let [headers, entries] = easytags#read_tagsfile(a:tagsfile)
call s:set_tagged_files(entries)
let filters = []
- let s:cached_filenames = {}
let tagged_files = s:find_tagged_files(a:output)
if !empty(tagged_files)
call add(filters, '!has_key(tagged_files, s:canonicalize(get(v:val, 1)))')
@@ -168,7 +176,6 @@ function! s:filter_merge_tags(filter_tags, tagsfile, output) " {{{3
if !empty(filters)
call filter(entries, join(filters, ' && '))
endif
- unlet s:cached_filenames
let num_filtered = num_old_entries - len(entries)
call map(entries, 'join(v:val, "\t")')
call extend(entries, a:output)
2  easytags.vim
View
@@ -4,7 +4,7 @@
" URL: http://peterodding.com/code/vim/easytags/
" Requires: Exuberant Ctags (http://ctags.sf.net)
" License: MIT
-" Version: 2.1.6
+" Version: 2.1.7
" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip
Please sign in to comment.
Something went wrong with that request. Please try again.