1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

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()
This commit is contained in:
Arif Kalluru 2022-07-15 08:21:10 +05:30 committed by GitHub
parent 881759e2ff
commit 05a78fe969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()