From 5181d49a6318032592e1876f654a952cce544ea6 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 27 Jan 2016 19:12:54 +0100 Subject: [PATCH] cmd.exe: Check for NONE/fg/bg of color value Color values can have NONE/fg/bg values as well, and this would error out. --- autoload/airline/highlighter.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index bc51457..26cdb9f 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -9,6 +9,8 @@ let s:accents = {} function! s:gui2cui(rgb, fallback) if a:rgb == '' return a:fallback + elseif match(a:rgb, 'NONE\|[fb]g') + return a:rgb endif let rgb = map(matchlist(a:rgb, '#\(..\)\(..\)\(..\)')[1:3], '0 + ("0x".v:val)') let rgb = [rgb[0] > 127 ? 4 : 0, rgb[1] > 127 ? 2 : 0, rgb[2] > 127 ? 1 : 0]