fix qf and preview not getting their styles applied.

This commit is contained in:
Bailey Ling 2013-07-10 15:02:34 +00:00
parent 8c6efa5698
commit 5fe642841e
2 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,8 @@ function! s:is_excluded_window()
endfunction endfunction
function! s:apply_window_overrides() function! s:apply_window_overrides()
call airline#extensions#clear_window_overrides()
if &buftype == 'quickfix' if &buftype == 'quickfix'
let w:airline_section_a = 'Quickfix' let w:airline_section_a = 'Quickfix'
let w:airline_section_b = '' let w:airline_section_b = ''

View File

@ -7,12 +7,14 @@ function! s:override_left_only(section1, section2)
let w:airline_left_only = 1 let w:airline_left_only = 1
endfunction endfunction
function! airline#extensions#apply_window_overrides() function! airline#extensions#clear_window_overrides()
silent! unlet w:airline_left_only silent! unlet w:airline_left_only
for section in s:sections for section in s:sections
silent! unlet w:airline_section_{section} silent! unlet w:airline_section_{section}
endfor endfor
endfunction
function! airline#extensions#apply_window_overrides()
if &ft == 'netrw' if &ft == 'netrw'
call s:override_left_only('netrw', '%f') call s:override_left_only('netrw', '%f')
elseif &ft == 'unite' elseif &ft == 'unite'