Fix enabling buffer when plugin disabled

Fixes #803.
This commit is contained in:
Andy Stewart
2022-02-02 10:58:53 +00:00
parent 54b94f98de
commit 23a65f370b
2 changed files with 24 additions and 13 deletions

View File

@@ -48,8 +48,7 @@ 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(bufnr) abort
return g:gitgutter_enabled &&
\ gitgutter#utility#getbufvar(a:bufnr, 'enabled', 1) &&
return gitgutter#utility#getbufvar(a:bufnr, 'enabled') &&
\ !pumvisible() &&
\ s:is_file_buffer(a:bufnr) &&
\ s:exists_file(a:bufnr) &&