comparison autoload/gutentags.vim @ 236:a77c3eb4ce34

Handle custom project root finder functions returning no value. This is easier on implementers than forcing them to raise an error that starts with "gutentags:".
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 10 Mar 2019 23:31:34 -0700
parents 34bee0477b51
children 050d0549ecf3
comparison
equal deleted inserted replaced
235:def58b9d22c6 236:a77c3eb4ce34
270 let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h') 270 let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h')
271 endif 271 endif
272 if !exists('b:gutentags_root') 272 if !exists('b:gutentags_root')
273 let b:gutentags_root = gutentags#get_project_root(l:buf_dir) 273 let b:gutentags_root = gutentags#get_project_root(l:buf_dir)
274 endif 274 endif
275 if !len(b:gutentags_root)
276 call gutentags#trace("no valid project root.. no gutentags support.")
277 return
278 endif
275 if filereadable(b:gutentags_root . '/.notags') 279 if filereadable(b:gutentags_root . '/.notags')
276 call gutentags#trace("'.notags' file found... no gutentags support.") 280 call gutentags#trace("'.notags' file found... no gutentags support.")
277 return 281 return
278 endif 282 endif
279 283