vimagit: let vimagit itself returns the current mode
If current vimagit version does not provide vimagit#get_current_mode(), internal string version is kept.
This commit is contained in:
parent
4a1f65841c
commit
640d6762f7
@ -13,6 +13,9 @@ function! airline#extensions#vimagit#init(ext)
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#vimagit#get_mode()
|
||||
if ( exists("*magit#get_current_mode") )
|
||||
return magit#get_current_mode()
|
||||
else
|
||||
if ( b:magit_current_commit_mode == '' )
|
||||
return "STAGING"
|
||||
elseif ( b:magit_current_commit_mode == 'CC' )
|
||||
@ -21,6 +24,7 @@ function! airline#extensions#vimagit#get_mode()
|
||||
return "AMEND"
|
||||
else
|
||||
return "???"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#vimagit#apply(...)
|
||||
|
Loading…
Reference in New Issue
Block a user