changeset 124:e2a43c03da79

Merge pull request #76 from GitHub.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 13 Jun 2016 18:46:35 -0700
parents 3763e9f412e7 (current diff) 76a4822aab76 (diff)
children db773e26e43b
files autoload/gutentags.vim doc/gutentags.txt
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/autoload/gutentags.vim	Mon Jun 13 18:44:29 2016 -0700
+++ b/autoload/gutentags.vim	Mon Jun 13 18:46:35 2016 -0700
@@ -166,7 +166,9 @@
         if g:gutentags_resolve_symlinks
             let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h')
         endif
-        let b:gutentags_root = gutentags#get_project_root(l:buf_dir)
+        if !exists('b:gutentags_root')
+            let b:gutentags_root = gutentags#get_project_root(l:buf_dir)
+        endif
         if filereadable(b:gutentags_root . '/.notags')
             call gutentags#trace("'.notags' file found... no gutentags support.")
             return
--- a/doc/gutentags.txt	Mon Jun 13 18:44:29 2016 -0700
+++ b/doc/gutentags.txt	Mon Jun 13 18:46:35 2016 -0700
@@ -344,9 +344,11 @@
 g:gutentags_enabled_user_func
                         When set to a non-empty string, it is expected to be
                         the name of a function that will be called when a file
-                        is open in a project. The function gets passed the
+                        is opened in a project. The function gets passed the
                         path of the file and if it returns 0, Gutentags won't
                         be enabled for that file.
+                        You can use this also to manually set `b:gutentags_root`
+                        (see |gutentags_project_root|).
                         Defaults to "".
 
                                             *gutentags_define_advanced_commands*