diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index d83f63f..1d89a77 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -26,17 +26,17 @@ endfunction function! gitgutter#utility#is_active() return g:gitgutter_enabled && \ !pumvisible() && + \ gitgutter#utility#is_file_buffer() && \ gitgutter#utility#exists_file() && - \ gitgutter#utility#not_git_dir() && - \ !gitgutter#utility#help_file() + \ gitgutter#utility#not_git_dir() endfunction function! gitgutter#utility#not_git_dir() return gitgutter#utility#full_path_to_directory_of_file() !~ '[/\\]\.git\($\|[/\\]\)' endfunction -function! gitgutter#utility#help_file() - return getbufvar(s:bufnr, '&filetype') ==# 'help' && getbufvar(s:bufnr, '&buftype') ==# 'help' +function! gitgutter#utility#is_file_buffer() + return empty(getbufvar(s:bufnr, '&buftype')) endfunction " A replacement for the built-in `shellescape(arg)`.