From 9e8fe7a98eb4cb57921071a46ccefe778a9357be Mon Sep 17 00:00:00 2001 From: Johnathan Date: Thu, 24 Apr 2014 03:03:03 +1000 Subject: [PATCH] doesn't assume user has 'set autochdir' set --- autoload/airline/extensions/branch.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/airline/extensions/branch.vim b/autoload/airline/extensions/branch.vim index 12be43f..ceaa44b 100644 --- a/autoload/airline/extensions/branch.vim +++ b/autoload/airline/extensions/branch.vim @@ -42,7 +42,7 @@ function! airline#extensions#branch#head() let b:airline_head = fugitive#head() if empty(b:airline_head) && !exists('b:git_dir') - let b:airline_head = s:get_git_branch(getcwd()) + let b:airline_head = s:get_git_branch(expand("%:p:h")) endif endif