# HG changeset patch # User Ludovic Chabant # Date 1458959219 25200 # Node ID efbe60d4865d2ed366cd5cd9a8c1a9bc70c9ff02 # Parent 05fc1e2172ccab273a15305f8168526a0a7d065e# Parent 7db339a3961fdf1aec1823b87f56f5258d66e8a4 Merge pull request #62 from GitHub. diff -r 7db339a3961f -r efbe60d4865d autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Wed Mar 02 10:47:55 2016 -0500 +++ b/autoload/gutentags/ctags.vim Fri Mar 25 19:26:59 2016 -0700 @@ -198,13 +198,27 @@ let l:lines = readfile(a:path) let l:outlines = [] for line in l:lines - let l:exarg = matchend(line, '\v^\-\-exclude=') - if l:exarg < 0 + let l:exarg_idx = matchend(line, '\v^\-\-exclude=') + if l:exarg_idx < 0 call add(l:outlines, line) continue endif - let l:fullp = gutentags#normalizepath(l:proj_dir.'/'. - \strpart(line, l:exarg + 1)) + + " Don't convert things that don't look like paths. + let l:exarg = strpart(line, l:exarg_idx + 1) + let l:do_convert = 1 + if l:exarg[0] == '@' " Manifest file path + let l:do_convert = 0 + endif + if stridx(l:exarg, '/') < 0 && stridx(l:exarg, '\\') < 0 " Filename + let l:do_convert = 0 + endif + if l:do_convert == 0 + call add(l:outlines, line) + continue + endif + + let l:fullp = l:proj_dir . gutentags#normalizepath('/'.l:exarg) let l:ol = '--exclude='.l:fullp call add(l:outlines, l:ol) endfor