Merge pull request #1602 from jreybert/dev/vimagit

vimagit: let vimagit itself returns the current mode
This commit is contained in:
Christian Brabandt 2017-11-20 13:57:42 +01:00 committed by GitHub
commit d719d0664a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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