mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 20:24:27 +08:00
fugitive: replace old buffer().commit() function by new global function
as requested by the exception thrown: fugitive: A third-party plugin or vimrc is calling fugitive#buffer().commit() which has been removed. Replace it with matchstr(FugitiveParse()[0], '^\x\+')
This commit is contained in:
@@ -101,7 +101,7 @@ endfunction
|
|||||||
function! s:display_git_branch()
|
function! s:display_git_branch()
|
||||||
let name = b:buffer_vcs_config['git'].branch
|
let name = b:buffer_vcs_config['git'].branch
|
||||||
try
|
try
|
||||||
let commit = fugitive#buffer().commit()
|
let commit = matchstr(FugitiveParse()[0], '^\x\+')
|
||||||
|
|
||||||
if has_key(s:names, commit)
|
if has_key(s:names, commit)
|
||||||
let name = get(s:names, commit)."(".name.")"
|
let name = get(s:names, commit)."(".name.")"
|
||||||
|
|||||||
Reference in New Issue
Block a user