[Tags] Support Windows-style absolute filepaths (#428)

This commit is contained in:
Jan Edmund Lazo 2017-08-20 10:14:31 -04:00 committed by Junegunn Choi
parent 1e40de4f2d
commit fa91d53f5c

View file

@ -753,8 +753,8 @@ function! s:tags_sink(lines)
let excmd = matchstr(join(parts[2:-2], '')[:-2], '^.*\ze;"\t')
let base = fnamemodify(parts[-1], ':h')
let relpath = parts[1][:-2]
let abspath = relpath =~ '^/' ? relpath : join([base, relpath], '/')
call s:open(cmd, abspath)
let abspath = relpath =~ (s:is_win ? '^[A-Z]:\' : '^/') ? relpath : join([base, relpath], '/')
call s:open(cmd, expand(abspath, 1))
execute excmd
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
catch /^Vim:Interrupt$/