don't change statuslines for location, quickfix, nerd, tagbar windows

This commit is contained in:
Bailey Ling 2013-07-01 22:54:15 -04:00
parent 68442f74ac
commit 989e17d2f0

View File

@ -51,6 +51,7 @@ let s:airline_highlight_map = {
function! s:highlight(mode, keys)
for key in a:keys
if exists('s:airline_colors_{a:mode}') && exists('s:airline_colors_{a:mode}[key]')
let colors = s:airline_colors_{a:mode}[key]
let cmd = printf('hi %s %s %s %s %s %s %s',
\ s:airline_highlight_map[key],
@ -61,10 +62,15 @@ function! s:highlight(mode, keys)
\ colors[4] != '' ? 'gui='.colors[4] : '',
\ colors[4] != '' ? 'term='.colors[4] : '')
exec cmd
endif
endfor
endfunction
function! s:update_statusline(active)
if &ft == 'qf' || matchstr(expand('%'), 'NERD') ==# 'NERD' || matchstr(expand('%'), 'Tagbar') ==# 'Tagbar'
return
endif
let l:mode_color = a:active ? "%2*" : "%9*"
let l:mode_sep_color = a:active ? "%3*" : "%9*"
let l:info_color = a:active ? "%4*" : "%9*"