diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index f2d7c5c..e52cfb7 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -773,9 +773,10 @@ function! fzf#vim#tags(query, ...) let tagfile = tagfiles()[0] " We don't want to apply --ansi option when tags file is large as it makes " processing much slower. - if getfsize(tagfile) > 1024 * 1024 * 20 + let tagsize = getfsize(tagfile) + if tagsize > 1024 * 1024 * 20 let proc = 'grep -av ''^\!'' ' - let copt = '' + let copt = tagsize > 1024 * 1024 * 200 ? '--algo=v1 ' : '' else let proc = 'perl -ne ''unless (/^\!/) { s/^(.*?)\t(.*?)\t/'.s:yellow('\1', 'Function').'\t'.s:blue('\2', 'String').'\t/; print }'' ' let copt = '--ansi '