Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 80:51c1a57811b3
Use full list of root markers in get_project_root.
Use l:markers instead of g:gutentags_project_root as the source of
project root indicators when testing parent directories.
In get_project_root, the list l:markers is built up with the contents of
g:gutentags_project_root and g:ctrlp_root_markers (if it exists).
However, g:gutentags_project_root was used directly while testing for
the presence of project root indicators (l:markers was ignored).
author | Greg Hensley <greg.hensley@gmail.com> |
---|---|
date | Thu, 30 Jul 2015 14:42:27 -0400 |
parents | d12543f11eb9 |
children | a837021a2388 |
comparison
equal
deleted
inserted
replaced
78:208130c6245e | 80:51c1a57811b3 |
---|---|
65 let l:markers = g:gutentags_project_root[:] | 65 let l:markers = g:gutentags_project_root[:] |
66 if exists('g:ctrlp_root_markers') | 66 if exists('g:ctrlp_root_markers') |
67 let l:markers += g:ctrlp_root_markers | 67 let l:markers += g:ctrlp_root_markers |
68 endif | 68 endif |
69 while l:path != l:previous_path | 69 while l:path != l:previous_path |
70 for root in g:gutentags_project_root | 70 for root in l:markers |
71 if getftype(l:path . '/' . root) != "" | 71 if getftype(l:path . '/' . root) != "" |
72 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) | 72 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) |
73 return gutentags#stripslash(l:proj_dir) | 73 return gutentags#stripslash(l:proj_dir) |
74 endif | 74 endif |
75 endfor | 75 endfor |