mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
Merge pull request #2457 from ytian81/remove_hunks_dependency_on_branch
Remove gitgutter hunks summary dependency on branch
This commit is contained in:
@@ -52,16 +52,9 @@ function! s:get_hunks_coc() abort
|
||||
return result
|
||||
endfunction
|
||||
|
||||
function! s:is_branch_empty() abort
|
||||
return exists('*airline#extensions#branch#head') &&
|
||||
\ empty(get(b:, 'airline_head', ''))
|
||||
endfunction
|
||||
|
||||
function! s:get_hunks_gitgutter() abort
|
||||
if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
|
||||
return ''
|
||||
endif
|
||||
return GitGutterGetHunkSummary()
|
||||
let hunks = GitGutterGetHunkSummary()
|
||||
return hunks == [0, 0, 0] ? [] : hunks
|
||||
endfunction
|
||||
|
||||
function! s:get_hunks_changes() abort
|
||||
|
||||
Reference in New Issue
Block a user