aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/xolox/easytags.vim10
1 files changed, 6 insertions, 4 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
index 2088f48..9ddea30 100644
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -246,15 +246,17 @@ function! s:filter_merge_tags(filter_tags, tagsfile, output, context) " {{{3
call filter(entries, join(filters, ' && '))
endif
let num_filtered = num_old_entries - len(entries)
- " Merge old/new tags and write tags file.
+ " Merge old/new tags.
call extend(entries, a:output)
+ " We've already read the tags file, cache the tagged files before the entries
+ " get flattened by the write.
+ let fname = s:canonicalize(a:tagsfile, a:context)
+ call s:cache_tagged_files_in(fname, getftime(fname), entries, a:context)
+ " And write tags file.
if !xolox#easytags#write_tagsfile(a:tagsfile, headers, entries)
let msg = "Failed to write filtered tags file %s!"
throw printf(msg, fnamemodify(a:tagsfile, ':~'))
endif
- " We've already read the tags file, might as well cache the tagged files :-)
- let fname = s:canonicalize(a:tagsfile, a:context)
- call s:cache_tagged_files_in(fname, getftime(fname), entries, a:context)
return num_filtered
endfunction