From 9fafe746a966eb0b02963cbe833ef6a3ce55ba6a Mon Sep 17 00:00:00 2001 From: Matt Nawara <31952903+mknaw@users.noreply.github.com> Date: Mon, 13 Apr 2020 07:01:19 -0400 Subject: Fix Undefined variable bug in vim-airline support script (#48) --- autoload/airline/themes/ayu.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/airline/themes/ayu.vim b/autoload/airline/themes/ayu.vim index 654e93e..2818f77 100644 --- a/autoload/airline/themes/ayu.vim +++ b/autoload/airline/themes/ayu.vim @@ -3,7 +3,9 @@ " Let's store all the colors in a dictionary. let s:c = {} -if ayucolor == 'light' +let s:ayucolor = get(g:, 'ayucolor', 'dark') + +if s:ayucolor == 'light' " Base colors. let s:c.base0 = { 'gui': '#EAEAEA', 'cterm': 0 } let s:c.base1 = { 'gui': '#FAFAFA', 'cterm': 8 } @@ -81,7 +83,7 @@ let g:airline#themes#ayu#palette.normal_modified = { " Colors. let s:I1 = s:Array('base2', 'green') -if ayucolor == 'light' +if s:ayucolor == 'light' let s:I2 = s:Array('orange', 'base3') else let s:I2 = s:Array('base6', 'base3') @@ -113,7 +115,7 @@ let g:airline#themes#ayu#palette.insert_paste = { " Colors. let s:R1 = s:Array('base2', 'orange') -if ayucolor == 'light' +if s:ayucolor == 'light' let s:R2 = s:Array('orange', 'base3') else let s:R2 = s:Array('base6', 'base3') @@ -134,7 +136,7 @@ let g:airline#themes#ayu#palette.replace_modified = { " Colors. let s:V1 = s:Array('base2', 'magenta') -if ayucolor == 'light' +if s:ayucolor == 'light' let s:V2 = s:Array('orange', 'base3') else let s:V2 = s:Array('base6', 'base3') -- cgit v1.2.3-18-g5258