mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-10 20:43: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.
|
" Finds the file's path relative to the repo root.
|
||||||
function! gitgutter#init_buffer(bufnr)
|
function! gitgutter#init_buffer(bufnr)
|
||||||
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
if gitgutter#utility#is_active(a:bufnr)
|
||||||
if type(p) != v:t_string || empty(p)
|
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
||||||
call gitgutter#utility#set_repo_path(a:bufnr)
|
if type(p) != v:t_string || empty(p)
|
||||||
|
call gitgutter#utility#set_repo_path(a:bufnr)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user