Add commands to enable/disable/toggle GitGutter per buffer.

This commit is contained in:
Andy Stewart
2019-01-08 12:47:10 +00:00
parent b11d74ca8f
commit 2dce8e032b
4 changed files with 33 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ endfunction
" This function does not and should not make any system calls.
function! gitgutter#utility#is_active(bufnr) abort
return g:gitgutter_enabled &&
\ gitgutter#utility#getbufvar(a:bufnr, 'enabled', 1) &&
\ !pumvisible() &&
\ s:is_file_buffer(a:bufnr) &&
\ s:exists_file(a:bufnr) &&