Skip to content

Commit

Permalink
Make consistent with GitGutterGetHunks()
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Feb 16, 2021
1 parent 6019d43 commit da77e46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ endfunction
" window. The format is [ added, modified, removed ], where each value
" represents the number of lines added/modified/removed respectively.
function! GitGutterGetHunkSummary()
return gitgutter#hunk#summary(winbufnr(0))
let bufnr = bufnr('')
return gitgutter#utility#is_active(bufnr) ? gitgutter#hunk#summary(bufnr) : []
endfunction

" }}}
Expand Down

0 comments on commit da77e46

Please sign in to comment.