mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Only set up maps once per buffer.
This commit is contained in:
@@ -24,10 +24,10 @@ 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)
|
||||||
if gitgutter#utility#is_active(a:bufnr)
|
if gitgutter#utility#is_active(a:bufnr)
|
||||||
call s:setup_maps()
|
|
||||||
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
let p = gitgutter#utility#repo_path(a:bufnr, 0)
|
||||||
if type(p) != s:t_string || empty(p)
|
if type(p) != s:t_string || empty(p)
|
||||||
call gitgutter#utility#set_repo_path(a:bufnr)
|
call gitgutter#utility#set_repo_path(a:bufnr)
|
||||||
|
call s:setup_maps()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user