@@ -78,19 +78,25 @@ function! xolox#easytags#check_ctags_compatible(name, min_version) " {{{2
78
78
call xolox#misc#msg#debug (" easytags.vim %s: Command '%s' returned nonzero exit code %i!" , g: xolox #easytags#version , a: name , result[' exit_code' ])
79
79
else
80
80
" Extract the version number from the output.
81
- let pattern = ' \(Exuberant\|Universal\) Ctags \zs\(\d\+\(\.\d\+\)*\|Development\)'
82
- let g: easytags_ctags_version = matchstr (get (result[' stdout' ], 0 , ' ' ), pattern)
83
- " Deal with development builds.
84
- if g: easytags_ctags_version == ' Development'
85
- call xolox#misc#msg#debug (" easytags.vim %s: Assuming development build is compatible .." , g: xolox #easytags#version , a: name )
86
- return 1
87
- endif
88
- " Make sure the version is compatible.
89
- if xolox#misc#version#at_least (a: min_version , g: easytags_ctags_version )
90
- call xolox#misc#msg#debug (" easytags.vim %s: Version is compatible! :-)" , g: xolox #easytags#version )
91
- return 1
92
- else
93
- call xolox#misc#msg#debug (" easytags.vim %s: Version is not compatible! :-(" , g: xolox #easytags#version )
81
+ let pattern = ' \(\w\+\) Ctags \(\d\+\(\.\d\+\)*\|Development\)'
82
+ let match = matchlist (get (result[' stdout' ], 0 , ' ' ), pattern)
83
+ let g: easytags_ctags_fork = match [1 ]
84
+ let g: easytags_ctags_version = match [2 ]
85
+ if g: easytags_ctags_fork != ' ' && g: easytags_ctags_version != ' '
86
+ call xolox#misc#msg#debug (" easytags.vim %s: Detected %s Ctags %s" , g: xolox #easytags#version , g: easytags_ctags_fork , g: easytags_ctags_version )
87
+ if g: easytags_ctags_fork == ' Universal'
88
+ " All versions should be compatible.
89
+ call xolox#misc#msg#debug (" easytags.vim %s: Assuming all versions is compatible .." , g: xolox #easytags#version )
90
+ return 1
91
+ elseif g: easytags_ctags_fork == ' Exuberant'
92
+ " Make sure the version is compatible.
93
+ if xolox#misc#version#at_least (a: min_version , g: easytags_ctags_version )
94
+ call xolox#misc#msg#debug (" easytags.vim %s: Version is compatible! :-)" , g: xolox #easytags#version )
95
+ return 1
96
+ else
97
+ call xolox#misc#msg#debug (" easytags.vim %s: Version is not compatible! :-(" , g: xolox #easytags#version )
98
+ endif
99
+ endif
94
100
endif
95
101
endif
96
102
call xolox#misc#msg#debug (" easytags.vim %s: Standard output of command: %s" , g: xolox #easytags#version , string (result[' stdout' ]))
0 commit comments