From 05a78fe9695d188f1f793d2270237a48e3e401a2 Mon Sep 17 00:00:00 2001 From: Arif Kalluru <97300325+Arif-Kalluru@users.noreply.github.com> Date: Fri, 15 Jul 2022 08:21:10 +0530 Subject: [PATCH] fix(branch): fix statusline branch info Problem: - fugitive#head() & fugitive#detect() notorking Solution: - Replaced fugitive#head() with FugitiveHead() if it exists or use fugitive#Head() - In cd7db1d of vim-fugitive, fugitive#detect() was replaced with FugitiveDetect() --- autoload/SpaceVim/layers/VersionControl.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/SpaceVim/layers/VersionControl.vim b/autoload/SpaceVim/layers/VersionControl.vim index 88f97162f..bf5f9fda5 100644 --- a/autoload/SpaceVim/layers/VersionControl.vim +++ b/autoload/SpaceVim/layers/VersionControl.vim @@ -77,10 +77,10 @@ endfunction function! s:git_branch() abort if exists('g:loaded_fugitive') try - let head = fugitive#head() + let head = exists("*FugitiveHead") ? FugitiveHead() : fugitive#Head() if empty(head) - call fugitive#detect(getcwd()) - let head = fugitive#head() + call FugitiveDetect(getcwd()) + let head = exists("*FugitiveHead") ? FugitiveHead() : fugitive#Head() endif if g:spacevim_statusline_unicode == 1 return empty(head) ? '' : '  '.head . ' ' . s:gtm_status()