get rid of background detection magic

This commit is contained in:
Stanislav Seletskiy 2013-07-15 11:57:14 +07:00
parent 230b16d3c5
commit 9f936281ed
1 changed files with 6 additions and 7 deletions

View File

@ -7,6 +7,12 @@ else
let s:reduced = 1 let s:reduced = 1
end end
if exists('g:airline_solarized_bg')
let s:background = g:airline_solarized_bg
else
let s:background = 'dark'
end
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" Colors " Colors
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
@ -30,13 +36,6 @@ let s:green = {'t': 64, 'g': '#859900'}
let s:c218 = {'t': 218, 'g': '#ffafd7'} let s:c218 = {'t': 218, 'g': '#ffafd7'}
let s:c52 = {'t': 52, 'g': '#5f0000'} let s:c52 = {'t': 52, 'g': '#5f0000'}
" Get background color
if index([string(s:base1.t), s:base1.g], synIDattr(synIDtrans(hlID('Normal')), 'fg')) > -1
let s:background = 'dark'
else
let s:background = 'light'
end
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" Simple mappings " Simple mappings
" NOTE: These are easily tweakable mappings. The actual mappings get " NOTE: These are easily tweakable mappings. The actual mappings get