mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-11 20:51:40 +08:00
pass context into the builder.
This commit is contained in:
@@ -24,16 +24,15 @@ function! s:prototype.add_raw(text)
|
||||
endfunction
|
||||
|
||||
function! s:prototype.build()
|
||||
if !self._active
|
||||
if !self._context.active
|
||||
let self._line = substitute(self._line, '%#.\{-}\ze#', '\0_inactive', 'g')
|
||||
endif
|
||||
return self._line
|
||||
endfunction
|
||||
|
||||
function! airline#builder#new(active, highlighter)
|
||||
function! airline#builder#new(context, highlighter)
|
||||
let builder = copy(s:prototype)
|
||||
let builder._sections = []
|
||||
let builder._active = a:active
|
||||
let builder._context = a:context
|
||||
let builder._highlighter = a:highlighter
|
||||
let builder._side = 1
|
||||
let builder._curgroup = ''
|
||||
|
||||
Reference in New Issue
Block a user