Permalink
Browse files

Fixed a bug with ToggleColorschemeBackground()

  • Loading branch information...
1 parent cd0349d commit 3f09a4d574d3fd46279f638051f508c7d31aa9e7 @Industrial committed Mar 29, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 .vimrc
View
11 .vimrc
@@ -74,7 +74,12 @@ set incsearch
set guioptions=emg
" colorscheme
-function l:toggleColorschemeBackground()
+function l:ToggleColorschemeBackground()
+ if !exists('g:lucius_style')
+ " set to light by default, making it dark on the first invocation
+ let g:lucius_style='light'
+ endif
+
if has('gui')
if g:lucius_style=='dark'
let g:lucius_style='light'
@@ -89,7 +94,7 @@ function l:toggleColorschemeBackground()
endfunction
" Initialize by calling
-call l:toggleColorschemeBackground()
+call l:ToggleColorschemeBackground()
" font
if has('macunix')
@@ -184,4 +189,4 @@ map <leader>d :SmartBd<cr>
map <leader>c :SmartBw<cr>
" Toggle background color
-map <f12> :call l:toggleColorschemeBackground()<cr>
+map <f12> :call l:ToggleColorschemeBackground()<cr>

0 comments on commit 3f09a4d

Please sign in to comment.