Permalink
Browse files

Minor logic tweaks, might improve performance

  • Loading branch information...
1 parent ac315a0 commit 43a704c57a151ea1018f8532a02b5afbd30d2d48 @xolox committed Jun 10, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 autoload.vim
View
@@ -53,15 +53,15 @@ function! easytags#update_cmd(filter_invalid_tags) " {{{1
call s:update_tagged_files(lines)
let filters = []
if ft_supported && !ft_ignored
- let filename_pattern = '\s' . xolox#escape#pattern(filename) . '\s'
+ let filename_pattern = '\t' . xolox#escape#pattern(filename) . '\t'
call add(filters, 'v:val !~ filename_pattern')
endif
if a:filter_invalid_tags
call add(filters, 'filereadable(get(split(v:val, "\t"), 1))')
endif
let filter = 'v:val =~ "^!_TAG_" || (' . join(filters, ' && ') . ')'
let filtered = filter(copy(lines), filter)
- if lines != filtered
+ if len(lines) != len(filtered)
if writefile(filtered, tagsfile) != 0
throw "Failed to write filtered tags file!"
endif

0 comments on commit 43a704c

Please sign in to comment.