From dc12e57dedd7bc5eb49b6d40b90aee23fe8b6fb1 Mon Sep 17 00:00:00 2001 From: Kien N Date: Wed, 2 May 2012 02:59:37 +0700 Subject: [PATCH] Tweak tags filter --- autoload/ctrlp/tag.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autoload/ctrlp/tag.vim b/autoload/ctrlp/tag.vim index d558ca7..26af1a0 100644 --- a/autoload/ctrlp/tag.vim +++ b/autoload/ctrlp/tag.vim @@ -40,20 +40,20 @@ fu! s:findcount(str) endf fu! s:filter(tags) - let [nr, alltags] = [0, a:tags] + let nr = 0 wh 0 < 1 - if empty(alltags) | brea | en - if alltags[nr] =~ '^!' && alltags[nr] !~ '^!_TAG_' + if a:tags == [] | brea | en + if a:tags[nr] =~ '^!' && a:tags[nr] !~ '^!_TAG_' let nr += 1 con en - if alltags[nr] =~ '^!_TAG_' && len(alltags) > nr - cal remove(alltags, nr) + if a:tags[nr] =~ '^!_TAG_' && len(a:tags) > nr + cal remove(a:tags, nr) el brea en endw - retu alltags + retu a:tags endf fu! s:syntax()