changeset 146:3459a2522a3b

Enable Project Root Finder Only set project root finder to blank if not already set and test explicitly for a non blank setting to see if it has been set
author thecontinium <thecontinium@outlook.com>
date Tue, 15 Nov 2016 12:50:48 +0800
parents d4c09aa41e80
children d566ec6cd2f7
files autoload/gutentags.vim plugin/gutentags.vim
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/autoload/gutentags.vim	Thu Oct 27 13:11:25 2016 +0200
+++ b/autoload/gutentags.vim	Tue Nov 15 12:50:48 2016 +0800
@@ -104,7 +104,7 @@
 " Finds the first directory with a project marker by walking up from the given
 " file path.
 function! gutentags#get_project_root(path) abort
-    if g:gutentags_project_root_finder
+    if g:gutentags_project_root_finder != ''
         return call(g:gutentags_project_root_finder, [a:path])
     endif
 
--- a/plugin/gutentags.vim	Thu Oct 27 13:11:25 2016 +0200
+++ b/plugin/gutentags.vim	Tue Nov 15 12:50:48 2016 +0800
@@ -32,7 +32,8 @@
 if g:gutentags_add_default_project_roots
     let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout']
 endif
-let g:gutentags_project_root_finder = ''
+
+let g:gutentags_project_root_finder = get(g:, 'gutentags_project_root_finder', '')
 
 let g:gutentags_project_info = get(g:, 'gutentags_project_info', [])
 call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'})