parent
e395afed51
commit
5f9ae83f44
|
@ -125,7 +125,7 @@ endfunction
|
|||
|
||||
" Update the statusline
|
||||
function! airline#update_statusline()
|
||||
if airline#util#getwinvar(winnr(), 'airline_disabled', 0)
|
||||
if airline#util#stl_disabled()
|
||||
return
|
||||
endif
|
||||
let range = filter(range(1, winnr('$')), 'v:val != winnr()')
|
||||
|
@ -154,7 +154,7 @@ endfunction
|
|||
|
||||
" Function to draw inactive statuslines for inactive windows
|
||||
function! airline#update_statusline_inactive(range)
|
||||
if airline#util#getwinvar(winnr(), 'airline_disabled', 0)
|
||||
if airline#util#stl_disabled()
|
||||
return
|
||||
endif
|
||||
for nr in a:range
|
||||
|
|
|
@ -161,3 +161,12 @@ function! airline#util#themes(match)
|
|||
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:match.'*.vim'), "\n")
|
||||
return sort(map(files, 'fnamemodify(v:val, ":t:r")') + ['random'])
|
||||
endfunction
|
||||
|
||||
function! airline#util#stl_disabled()
|
||||
" setting the statusline is disabled,
|
||||
" either globally or per window
|
||||
" w:airline_disabled is deprecated!
|
||||
return get(g:, 'airline_disable_statusline', 0) ||
|
||||
\ airline#util#getwinvar(winnr(), 'airline_disable_statusline', 0) ||
|
||||
\ airline#util#getwinvar(winnr(), 'airline_disabled', 0)
|
||||
endfunction
|
||||
|
|
|
@ -228,10 +228,19 @@ values):
|
|||
heavily) >
|
||||
let g:airline_exclude_preview = 0
|
||||
<
|
||||
* disable the Airline customization for selected windows (this is a
|
||||
* disable the Airline statusline customization for selected windows (this is a
|
||||
window-local variable so you can disable it per-window) >
|
||||
let w:airline_disabled = 1
|
||||
let w:airline_disable_statusline = 1
|
||||
<
|
||||
Old deprecated name: `w:airline_disabled`
|
||||
|
||||
See also the following option, for disabling setting the statusline globally
|
||||
* Disable setting the statusline option: >
|
||||
let g:airline_disable_statusline = 1
|
||||
|
||||
< This setting disables setting the 'statusline' option. This allows to use
|
||||
e.g. the tabline extension (|airline-tabline|) but keep the 'statusline'
|
||||
option totally configurable by a custom configuration.
|
||||
* Do not draw separators for empty sections (only for the active window) >
|
||||
let g:airline_skip_empty_sections = 1
|
||||
<
|
||||
|
|
|
@ -178,9 +178,11 @@ function! s:airline_toggle()
|
|||
endif
|
||||
augroup END
|
||||
|
||||
if !airline#util#stl_disabled()
|
||||
if &laststatus < 2
|
||||
set laststatus=2
|
||||
endif
|
||||
endif
|
||||
if s:airline_initialized
|
||||
call s:on_window_changed('Init')
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue