# HG changeset patch # User Ludovic Chabant # Date 1490315894 25200 # Node ID 0b4ccd0deceb58e1ae108ee5f6e181a5f740d04f # Parent 8bac4b955c84582ba7017e7405469a3517e4b5c3 Fix broken test for whether the tag file is inside the project root. diff -r 8bac4b955c84 -r 0b4ccd0deceb autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Thu Mar 23 16:00:24 2017 -0700 +++ b/autoload/gutentags/ctags.vim Thu Mar 23 17:38:14 2017 -0700 @@ -69,7 +69,8 @@ call gutentags#chdir(fnameescape(a:proj_dir)) let l:tags_file_exists = filereadable(a:tags_file) - let l:tags_file_is_local = match(a:tags_file, '\v[/\\]') < 0 + let l:tags_file_relative = fnamemodify(a:tags_file, ':.') + let l:tags_file_is_local = len(l:tags_file_relative) < len(a:tags_file) if l:tags_file_exists && g:gutentags_ctags_check_tagfile let l:first_lines = readfile(a:tags_file, '', 1) @@ -91,7 +92,7 @@ " confused if the paths have spaces -- but not if you're *in* the root " directory, for some reason... let l:actual_proj_dir = '.' - let l:actual_tags_file = fnamemodify(a:tags_file, ':.') + let l:actual_tags_file = l:tags_file_relative call gutentags#chdir(fnameescape(a:proj_dir)) else " else: the tags file goes in a cache directory, so we need to specify