mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-14 21:42:46 +08:00
Fixed compatibility with Universal Ctags
This commit fixes tagbar compatibility issues with the [universal-ctags](/universal-ctags/ctags), which is the most active and consistently updated fork of the old exuberant ctags.
This commit is contained in:
parent
399b75256a
commit
d01d7e7546
|
@ -1086,7 +1086,7 @@ function! s:CheckForExCtags(silent) abort
|
|||
|
||||
let ctags_output = s:ExecuteCtags(ctags_cmd)
|
||||
|
||||
if v:shell_error || ctags_output !~# 'Exuberant Ctags'
|
||||
if v:shell_error || ctags_output !~# '\(Exuberant\|Universal\) Ctags'
|
||||
let errmsg = 'Tagbar: Ctags doesn''t seem to be Exuberant Ctags!'
|
||||
let infomsg = 'GNU ctags will NOT WORK.' .
|
||||
\ ' Please download Exuberant Ctags from ctags.sourceforge.net' .
|
||||
|
@ -1148,6 +1148,11 @@ function! s:CheckExCtagsVersion(output) abort
|
|||
return 1
|
||||
endif
|
||||
|
||||
if a:output =~ 'Universal Ctags'
|
||||
call s:debug("Found Universal Ctags, assuming compatibility")
|
||||
return 1
|
||||
endif
|
||||
|
||||
let matchlist = matchlist(a:output, '\vExuberant Ctags (\d+)\.(\d+)')
|
||||
let major = matchlist[1]
|
||||
let minor = matchlist[2]
|
||||
|
|
Loading…
Reference in New Issue
Block a user