From 68024ec33d536b93f69063dbd4faeeeee586cf20 Mon Sep 17 00:00:00 2001 From: kazukazuinaina Date: Thu, 21 May 2020 01:26:33 +0900 Subject: [PATCH] fix missing endif --- autoload/airline/extensions/vimagit.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/airline/extensions/vimagit.vim b/autoload/airline/extensions/vimagit.vim index fa653fa2..f6612f06 100644 --- a/autoload/airline/extensions/vimagit.vim +++ b/autoload/airline/extensions/vimagit.vim @@ -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