# HG changeset patch # User Ludovic Chabant # Date 1465868795 25200 # Node ID e2a43c03da79cf59cbe3d690c216483323fe9dfc # Parent 3763e9f412e757f9cd2e9e7b53b2930cf6de6478# Parent 76a4822aab767e492c3c807545f1262a08e34828 Merge pull request #76 from GitHub. diff -r 3763e9f412e7 -r e2a43c03da79 autoload/gutentags.vim --- 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 diff -r 3763e9f412e7 -r e2a43c03da79 doc/gutentags.txt --- 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*