Mercurial > vim-gutentags
changeset 90:b9965d1288c3
Don't enable Gutentags for markers at the root of the file-system.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 07 Jan 2016 21:09:52 -0800 |
parents | 8bf96f9f649c |
children | 54355724204b |
files | autoload/gutentags.vim |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags.vim Tue Dec 01 22:04:45 2015 -0800 +++ b/autoload/gutentags.vim Thu Jan 07 21:09:52 2016 -0800 @@ -91,7 +91,16 @@ for root in l:markers if getftype(l:path . '/' . root) != "" let l:proj_dir = simplify(fnamemodify(l:path, ':p')) - return gutentags#stripslash(l:proj_dir) + let l:proj_dir = gutentags#stripslash(l:proj_dir) + if l:proj_dir == '' + call gutentags#trace("Found project marker '" . root . + \"' at the root of your file-system! " . + \" That's probably wrong, disabling " . + \"gutentags for this file...", + \1) + call gutentags#throw("Marker found at root, aborting.") + endif + return l:proj_dir endif endfor let l:previous_path = l:path