From cf9028df9f7f609c3f5a85ba7f0b2f47304b68f6 Mon Sep 17 00:00:00 2001 From: bling Date: Sat, 10 Aug 2013 11:46:12 -0400 Subject: [PATCH] fixes error when colorscheme declared in gvimrc. resolves #126. --- autoload/airline/themes.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index ec3e1697..9b47e242 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -20,7 +20,11 @@ function! s:get_syn(group, what) let color = synIDattr(synIDtrans(hlID('Normal')), a:what) endif if empty(color) || color == -1 - let color = a:what ==# 'fg' ? 0 : 1 + if has('gui_running') + let color = a:what ==# 'fg' ? '#000000' : '#FFFFFF' + else + let color = a:what ==# 'fg' ? 0 : 1 + endif endif return color endfunction