From 5b840ae43630105bb57f8a4ec951d80561382200 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Tue, 13 Aug 2013 22:10:44 -0400 Subject: [PATCH] fixes error when colorscheme is used in gvimrc (#126). --- autoload/airline/themes.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index 040c52a..e932185 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -20,9 +20,11 @@ function! airline#themes#generate_color_map(section1, section2, section3, file) endfunction function! s:get_syn(group, what) - let color = synIDattr(synIDtrans(hlID(a:group)), a:what) + " need to pass in mode, known to break on 7.3.547 + let mode = has('gui_running') ? 'gui' : 'cterm' + let color = synIDattr(synIDtrans(hlID(a:group)), a:what, mode) if empty(color) || color == -1 - let color = synIDattr(synIDtrans(hlID('Normal')), a:what) + let color = synIDattr(synIDtrans(hlID('Normal')), a:what, mode) endif if empty(color) || color == -1 if has('gui_running')