Do not process help files.

This commit is contained in:
Andy Stewart
2015-07-14 14:44:35 +02:00
parent 339f8ba079
commit 2e98692278

View File

@@ -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