Skip to content

Commit a76b582

Browse files
committed
Call ctags with --file-scope=yes argument
Universal Ctags requires the `F` flag to be present in the --extra argument in order to report file-scoped tags. The easiest way to make an argument list compatible with both Exuberant Ctags and Universal Ctags is to pass the --file-scope=yes argument in both cases. This will cause Universal Ctags to report file-scoped tags, and be a no-op on Exuberant Ctags since it does that already even with an empty --extra argument.
1 parent 0415f77 commit a76b582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/ctrlp/buffertag.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fu! s:exectags(cmd)
139139
endf
140140

141141
fu! s:exectagsonfile(fname, ftype)
142-
let [ags, ft] = ['-f - --sort=no --excmd=pattern --fields=nKs --extra= ', a:ftype]
142+
let [ags, ft] = ['-f - --sort=no --excmd=pattern --fields=nKs --extra= --file-scope=yes ', a:ftype]
143143
if type(s:types[ft]) == 1
144144
let ags .= s:types[ft]
145145
let bin = s:bin

0 commit comments

Comments
 (0)