mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-10 12:33:47 -05:00
Check buffer is active before init.
This commit is contained in:
@@ -13,9 +13,11 @@ endfunction
|
||||
|
||||
" Finds the file's path relative to the repo root.
|
||||
function! gitgutter#init_buffer(bufnr)
|
||||
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
||||
if type(p) != v:t_string || empty(p)
|
||||
call gitgutter#utility#set_repo_path(a:bufnr)
|
||||
if gitgutter#utility#is_active(a:bufnr)
|
||||
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
||||
if type(p) != v:t_string || empty(p)
|
||||
call gitgutter#utility#set_repo_path(a:bufnr)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user