From 2e98692278aa25413d36b1d32bf01c2442a42f51 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Tue, 14 Jul 2015 14:44:35 +0200 Subject: [PATCH] Do not process help files. --- autoload/gitgutter/utility.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index 784d6b7..2281448 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -12,13 +12,17 @@ endfunction " Returns truthy when the buffer's file should be processed; and falsey when it shouldn't. " This function does not and should not make any system calls. function! gitgutter#utility#is_active() - return g:gitgutter_enabled && gitgutter#utility#exists_file() && gitgutter#utility#not_git_dir() + return g:gitgutter_enabled && gitgutter#utility#exists_file() && gitgutter#utility#not_git_dir() && gitgutter#utility#not_help_file() endfunction function! gitgutter#utility#not_git_dir() return gitgutter#utility#full_path_to_directory_of_file() !~ '[/\\]\.git\($\|[/\\]\)' endfunction +function! gitgutter#utility#not_help_file() + return getbufvar(s:bufnr, '&filetype') != 'help' +endfunction + " A replacement for the built-in `shellescape(arg)`. " " Recent versions of Vim handle shell escaping pretty well. However older