Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 131:ec57d6a14486
Don't search through the same root markers twice.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 20 Jul 2016 12:11:13 +0200 |
parents | b6ec4caa22ff |
children | a6ef1c860d07 |
comparison
equal
deleted
inserted
replaced
130:b6ec4caa22ff | 131:ec57d6a14486 |
---|---|
85 let l:previous_path = "" | 85 let l:previous_path = "" |
86 let l:markers = g:gutentags_project_root[:] | 86 let l:markers = g:gutentags_project_root[:] |
87 if exists('g:ctrlp_root_markers') | 87 if exists('g:ctrlp_root_markers') |
88 let l:markers += g:ctrlp_root_markers | 88 let l:markers += g:ctrlp_root_markers |
89 endif | 89 endif |
90 let l:markers = uniq(sort(l:markers)) | |
90 while l:path != l:previous_path | 91 while l:path != l:previous_path |
91 for root in l:markers | 92 for root in l:markers |
92 if getftype(l:path . '/' . root) != "" | 93 if getftype(l:path . '/' . root) != "" |
93 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) | 94 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) |
94 let l:proj_dir = gutentags#stripslash(l:proj_dir) | 95 let l:proj_dir = gutentags#stripslash(l:proj_dir) |