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:
parent
881759e2ff
commit
05a78fe969
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user