Skip to content

Commit

Permalink
Only set up maps once per buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Jul 6, 2018
1 parent f536a35 commit 6076c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/gitgutter.vim
Expand Up @@ -24,10 +24,10 @@ endfunction
" Finds the file's path relative to the repo root.
function! gitgutter#init_buffer(bufnr)
if gitgutter#utility#is_active(a:bufnr)
call s:setup_maps()
let p = gitgutter#utility#repo_path(a:bufnr, 0)
if type(p) != s:t_string || empty(p)
call gitgutter#utility#set_repo_path(a:bufnr)
call s:setup_maps()
endif
endif
endfunction
Expand Down

0 comments on commit 6076c96

Please sign in to comment.