Skip to content
Browse files

Version 8.1.2

Fixed some issues that arise from setting Normal at different times in the file. This basically always caused the "background" option to be set to "light".
  • Loading branch information...
1 parent 8a83ab8 commit 215433f834db44d349f46285e32982d68d15b244 @jonathanfilip jonathanfilip committed with Sep 5, 2012
Showing with 23 additions and 23 deletions.
  1. +23 −23 colors/lucius.vim
View
46 colors/lucius.vim
@@ -1,7 +1,7 @@
" ============================================================================
" Name: Lucius vim color scheme
" Author: Jonathan Filip <jfilip1024@gmail.com>
-" Version: 8.1.1
+" Version: 8.1.2
" ----------------------------------------------------------------------------
"
" Light and dark color scheme for GUI and 256 color terminal.
@@ -96,20 +96,18 @@
" Options:
" ============================================================================
+unlet! g:colors_name
hi clear
if exists("syntax_on")
syntax reset
endif
-let colors_name="lucius"
if exists("g:lucius_style")
let s:style = g:lucius_style
else
let s:style = &background
endif
-exec "set background=" . s:style
-
if exists("g:lucius_contrast")
let s:contrast = g:lucius_contrast
else
@@ -232,7 +230,6 @@ endfunction
" ============================================================================
let s:normal_items = [
- \ "Normal",
\ "ColorColumn", "Comment", "Constant", "Cursor", "CursorColumn",
\ "CursorIM", "CursorLine", "CursorLineNr", "DiffAdd", "DiffChange",
\ "DiffDelete", "Directory", "Error", "ErrorMsg", "Identifier",
@@ -257,21 +254,18 @@ let s:undercurl_items = [
\ "SpellBad", "SpellCap", "SpellLocal", "SpellRare"
\ ]
-" Clear default settings
-for s:item in s:normal_items + s:bold_items + s:underline_items + s:undercurl_items
- exec "hi " . s:item . " guifg=NONE guibg=NONE gui=none"
- \ . " ctermfg=NONE ctermbg=NONE cterm=none term=none"
-endfor
-
" ============================================================================
" Color Definitions:
" ============================================================================
" ----------------------------------------------------------------------------
-" Default Foreground:
+" 'Normal' Colors:
" ----------------------------------------------------------------------------
+hi clear Normal
+hi Normal gui=none cterm=none term=none
+
if s:style == "light"
if s:contrast == "high"
hi Normal guifg=#000000
@@ -290,11 +284,6 @@ else
endif
endif
-
-" ----------------------------------------------------------------------------
-" Default Background:
-" ----------------------------------------------------------------------------
-
if s:style == "light"
if s:contrast_bg == "high"
hi Normal guibg=#ffffff
@@ -309,6 +298,23 @@ else
endif
endif
+call s:AddCterm("Normal")
+
+
+" ----------------------------------------------------------------------------
+" Extra setup
+" ----------------------------------------------------------------------------
+
+exec "set background=" . s:style
+
+" Clear default settings
+for s:item in s:normal_items + s:bold_items + s:underline_items + s:undercurl_items
+ exec "hi " . s:item . " guifg=NONE guibg=NONE gui=none"
+ \ . " ctermfg=NONE ctermbg=NONE cterm=none term=none"
+endfor
+
+let g:colors_name="lucius"
+
" ----------------------------------------------------------------------------
" Text Markup:
@@ -639,10 +645,6 @@ hi Underlined guifg=fg
" Text Emphasis:
" ============================================================================
-for s:item in s:normal_items
- exec "hi " . s:item . " gui=none cterm=none term=none"
-endfor
-
if s:use_bold == 1
for s:item in s:bold_items
exec "hi " . s:item . " gui=bold cterm=bold term=none"
@@ -667,8 +669,6 @@ endfor
" Cterm Colors:
" ============================================================================
-call s:AddCterm("Normal")
-
for s:item in s:normal_items + s:bold_items + s:underline_items
call s:AddCterm(s:item)
endfor

0 comments on commit 215433f

Please sign in to comment.
Something went wrong with that request. Please try again.