changeset 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 def58b9d22c6
children 62e21302c221
files autoload/gutentags.vim
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/autoload/gutentags.vim	Tue Dec 18 23:32:20 2018 +0300
+++ b/autoload/gutentags.vim	Sun Mar 10 23:31:34 2019 -0700
@@ -272,6 +272,10 @@
         if !exists('b:gutentags_root')
             let b:gutentags_root = gutentags#get_project_root(l:buf_dir)
         endif
+        if !len(b:gutentags_root)
+            call gutentags#trace("no valid project root.. no gutentags support.")
+            return
+        endif
         if filereadable(b:gutentags_root . '/.notags')
             call gutentags#trace("'.notags' file found... no gutentags support.")
             return