mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-20 04:24:41 +02:00
remove gitgutter dependecy on branch
This commit is contained in:
parent
26f922753a
commit
0dd6f5e711
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user