Merge pull request #2136 from kazukazuinaina/fix_endif

fix missing endif
This commit is contained in:
IK 2020-05-21 03:13:53 +09:00 committed by GitHub
commit f244ff9987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -9,11 +9,11 @@ if !get(g:, 'loaded_magit', 0)
finish
endif
function! airline#extensions#vimagit#init(ext)
function! airline#extensions#vimagit#init(ext) abort
call a:ext.add_statusline_func('airline#extensions#vimagit#apply')
endfunction
function! airline#extensions#vimagit#get_mode()
function! airline#extensions#vimagit#get_mode() abort
if ( exists("*magit#get_current_mode") )
return magit#get_current_mode()
else
@ -26,9 +26,10 @@ function! airline#extensions#vimagit#get_mode()
else
return "???"
endif
endif
endfunction
function! airline#extensions#vimagit#apply(...)
function! airline#extensions#vimagit#apply(...) abort
if ( &filetype == 'magit' )
let w:airline_section_a = '%{airline#extensions#vimagit#get_mode()}'
endif