From 74ca43a9b66a8fa6c01c3d7c51bbb034622eedf2 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 29 Mar 2020 19:04:39 +0200 Subject: [PATCH] [hunks] also cache coc git status --- autoload/airline/extensions/hunks.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/hunks.vim b/autoload/airline/extensions/hunks.vim index b30ff463..5f88a1ab 100644 --- a/autoload/airline/extensions/hunks.vim +++ b/autoload/airline/extensions/hunks.vim @@ -73,8 +73,6 @@ function! airline#extensions#hunks#get_raw_hunks() abort else let b:source_func = 's:get_hunks_empty' endif - else - let b:source_func = 's:get_hunks_empty' endif return {b:source_func}() endfunction @@ -90,7 +88,8 @@ function! airline#extensions#hunks#get_hunks() abort \ get(b:, 'source_func', '') isnot# 's:get_hunks_signify' && \ get(b:, 'source_func', '') isnot# 's:get_hunks_gitgutter' && \ get(b:, 'source_func', '') isnot# 's:get_hunks_empty' && - \ get(b:, 'source_func', '') isnot# 's:get_hunks_changes' + \ get(b:, 'source_func', '') isnot# 's:get_hunks_changes' && + \ get(b:, 'source_func', '') isnot# 's:get_hunks_coc' return b:airline_hunks endif let hunks = airline#extensions#hunks#get_raw_hunks()