From 79f91649b6779cf0add768098d545874e4baa719 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 8 May 2019 13:57:25 +0200 Subject: [PATCH] branch: Check untracked and dirty only wehn the fugitive/lawrencium plugins are installed --- autoload/airline/extensions/branch.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 2da059f..fc7de3d 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -197,6 +197,13 @@ function! s:update_untracked() endif for vcs in keys(s:vcs_config) + " only check, for git, if fugitive is installed + " and for 'hg' if lawrencium is installed, else skip + if vcs is# 'git' && !airline#util#has_fugitive() + continue + elseif vcs is# 'mercurial' && !airline#util#has_lawrencium() + continue + endif let config = s:vcs_config[vcs] " Note that asynchronous update updates s:vcs_config only, and only " s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is