mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-15 19:45:46 +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
|
function! s:git_branch() abort
|
||||||
if exists('g:loaded_fugitive')
|
if exists('g:loaded_fugitive')
|
||||||
try
|
try
|
||||||
let head = fugitive#head()
|
let head = exists("*FugitiveHead") ? FugitiveHead() : fugitive#Head()
|
||||||
if empty(head)
|
if empty(head)
|
||||||
call fugitive#detect(getcwd())
|
call FugitiveDetect(getcwd())
|
||||||
let head = fugitive#head()
|
let head = exists("*FugitiveHead") ? FugitiveHead() : fugitive#Head()
|
||||||
endif
|
endif
|
||||||
if g:spacevim_statusline_unicode == 1
|
if g:spacevim_statusline_unicode == 1
|
||||||
return empty(head) ? '' : ' '.head . ' ' . s:gtm_status()
|
return empty(head) ? '' : ' '.head . ' ' . s:gtm_status()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user