always run the extensions/core funcrefs last.
this ensures the user always has priority in customizations.
This commit is contained in:
parent
96e92232f6
commit
389650645b
|
@ -84,9 +84,12 @@ function! airline#update_statusline()
|
|||
call s:invoke_funcrefs(context, g:airline_statusline_funcrefs)
|
||||
endfunction
|
||||
|
||||
let s:core_funcrefs = [
|
||||
\ function('airline#extensions#apply'),
|
||||
\ function('airline#extensions#default#apply') ]
|
||||
function! s:invoke_funcrefs(context, funcrefs)
|
||||
let builder = airline#builder#new(a:context)
|
||||
let err = airline#util#exec_funcrefs(a:funcrefs + [function('airline#extensions#default#apply')], builder, a:context)
|
||||
let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context)
|
||||
if err == 1
|
||||
call setwinvar(a:context.winnr, '&statusline', builder.build())
|
||||
endif
|
||||
|
|
|
@ -51,7 +51,7 @@ function! airline#extensions#apply_left_override(section1, section2)
|
|||
endfunction
|
||||
|
||||
let s:active_winnr = -1
|
||||
function! airline#extensions#update_statusline(...)
|
||||
function! airline#extensions#apply(...)
|
||||
if s:is_excluded_window()
|
||||
return -1
|
||||
endif
|
||||
|
@ -124,9 +124,6 @@ function! airline#extensions#load()
|
|||
" non-trivial number of external plugins use eventignore=all, so we need to account for that
|
||||
autocmd CursorMoved * call <sid>sync_active_winnr()
|
||||
|
||||
" load core funcrefs
|
||||
call airline#add_statusline_func('airline#extensions#update_statusline')
|
||||
|
||||
if get(g:, 'loaded_unite', 0)
|
||||
call airline#extensions#unite#init(s:ext)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue