comparison autoload/gutentags.vim @ 90:b9965d1288c3

Don't enable Gutentags for markers at the root of the file-system.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 07 Jan 2016 21:09:52 -0800
parents 8bf96f9f649c
children d645125192aa 32e3d047e54e
comparison
equal deleted inserted replaced
89:8bf96f9f649c 90:b9965d1288c3
89 endif 89 endif
90 while l:path != l:previous_path 90 while l:path != l:previous_path
91 for root in l:markers 91 for root in l:markers
92 if getftype(l:path . '/' . root) != "" 92 if getftype(l:path . '/' . root) != ""
93 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) 93 let l:proj_dir = simplify(fnamemodify(l:path, ':p'))
94 return gutentags#stripslash(l:proj_dir) 94 let l:proj_dir = gutentags#stripslash(l:proj_dir)
95 if l:proj_dir == ''
96 call gutentags#trace("Found project marker '" . root .
97 \"' at the root of your file-system! " .
98 \" That's probably wrong, disabling " .
99 \"gutentags for this file...",
100 \1)
101 call gutentags#throw("Marker found at root, aborting.")
102 endif
103 return l:proj_dir
95 endif 104 endif
96 endfor 105 endfor
97 let l:previous_path = l:path 106 let l:previous_path = l:path
98 let l:path = fnamemodify(l:path, ':h') 107 let l:path = fnamemodify(l:path, ':h')
99 endwhile 108 endwhile