comparison autoload/gutentags.vim @ 134:04288637e595

Don't use `uniq`. * It's only in the latest versions of Vim. * It forces re-ordering the markers which could potentially break things.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 21 Jul 2016 00:41:23 +0200
parents a6ef1c860d07
children 286e5b3095d0
comparison
equal deleted inserted replaced
133:6f15299869fc 134:04288637e595
87 87
88 let l:path = gutentags#stripslash(a:path) 88 let l:path = gutentags#stripslash(a:path)
89 let l:previous_path = "" 89 let l:previous_path = ""
90 let l:markers = g:gutentags_project_root[:] 90 let l:markers = g:gutentags_project_root[:]
91 if exists('g:ctrlp_root_markers') 91 if exists('g:ctrlp_root_markers')
92 let l:markers += g:ctrlp_root_markers 92 for crm in g:ctrlp_root_markers
93 endif 93 if index(l:markers, crm) < 0
94 let l:markers = uniq(sort(l:markers)) 94 call add(l:markers, crm)
95 endif
96 endfor
97 endif
95 while l:path != l:previous_path 98 while l:path != l:previous_path
96 for root in l:markers 99 for root in l:markers
97 if getftype(l:path . '/' . root) != "" 100 if getftype(l:path . '/' . root) != ""
98 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) 101 let l:proj_dir = simplify(fnamemodify(l:path, ':p'))
99 let l:proj_dir = gutentags#stripslash(l:proj_dir) 102 let l:proj_dir = gutentags#stripslash(l:proj_dir)