mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-21 04:54:45 +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
|
return result
|
||||||
endfunction
|
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
|
function! s:get_hunks_gitgutter() abort
|
||||||
if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
|
let hunks = GitGutterGetHunkSummary()
|
||||||
return ''
|
return hunks == [0, 0, 0] ? [] : hunks
|
||||||
endif
|
|
||||||
return GitGutterGetHunkSummary()
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:get_hunks_changes() abort
|
function! s:get_hunks_changes() abort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user