aboutsummaryrefslogtreecommitdiff
path: root/autoload/airline
diff options
context:
space:
mode:
authorMatt Nawara <31952903+mknaw@users.noreply.github.com>2020-04-13 07:01:19 -0400
committerGitHub <noreply@github.com>2020-04-13 14:01:19 +0300
commit9fafe746a966eb0b02963cbe833ef6a3ce55ba6a (patch)
treefc84fa284ee9c70840eef3ed5069428a478f0869 /autoload/airline
parent9dab20b38335ed06738f251e92e3817182063759 (diff)
Fix Undefined variable bug in vim-airline support script (#48)
Diffstat (limited to 'autoload/airline')
-rw-r--r--autoload/airline/themes/ayu.vim10
1 files 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')