From 6dae3452db276d0a20ba64433a7858db21609a25 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 3 Nov 2016 17:26:32 +0100 Subject: [PATCH] Fix order of statements Commit #3bd6cb5ee498 causes an error, because a variable was used before it was declared. Fix this. --- autoload/airline/extensions/branch.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 3052c25..d130dfc 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -3,13 +3,14 @@ scriptencoding utf-8 +let s:has_fugitive = exists('*fugitive#head') +let s:has_lawrencium = exists('*lawrencium#statusline') +let s:has_vcscommand = get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine') + if !s:has_fugitive && !s:has_lawrencium && !s:has_vcscommand finish endif -let s:has_fugitive = exists('*fugitive#head') -let s:has_lawrencium = exists('*lawrencium#statusline') -let s:has_vcscommand = get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine') let s:has_async = airline#util#async let s:git_dirs = {}