Skip to content

Commit

Permalink
fix syntax/calendar.vim: improve NormalSpace colors when no colors ar…
Browse files Browse the repository at this point in the history
…e set for Normal in gui (fix #143)
  • Loading branch information
itchyny committed Nov 2, 2018
1 parent 3c6a767 commit 8f6c29b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions syntax/calendar.vim
Expand Up @@ -2,7 +2,7 @@
" Filename: syntax/calendar.vim
" Author: itchyny
" License: MIT License
" Last Change: 2018/03/12 18:49:05.
" Last Change: 2018/11/02 23:13:54.
" =============================================================================

if version < 700
Expand All @@ -19,6 +19,8 @@ let s:fg_color = calendar#color#normal_fg_color()
let s:bg_color = calendar#color#normal_bg_color()
let s:comment_fg_color = calendar#color#comment_fg_color()
let s:select_color = calendar#color#gen_color(s:fg_color, s:bg_color, 1, 4)
let s:space_fg_color = calendar#color#gen_color(s:fg_color, s:bg_color, 0, 1)
let s:space_bg_color = calendar#color#gen_color(s:fg_color, s:bg_color, 1, 0)
let s:is_win32cui = (has('win32') || has('win64')) && !s:is_gui
let s:is_dark = calendar#color#is_dark()

Expand Down Expand Up @@ -85,12 +87,12 @@ call calendar#color#syntax('SundayTitle', s:sunday_title_fg_color, s:sunday_bg_c
call calendar#color#syntax('SaturdayTitle', s:saturday_title_fg_color, s:saturday_bg_color, '')
call calendar#color#syntax('OtherMonth', s:othermonth_fg_color, '', '')
call calendar#color#syntax('OtherMonthSelect', s:othermonth_fg_color, s:select_color, '')
call calendar#color#syntax('NormalSpace', s:bg_color, s:fg_color, '')
call calendar#color#syntax('NormalSpace', s:space_fg_color, s:space_bg_color, '')
call calendar#color#syntax('CommentSelect', s:comment_fg_color, s:select_color, '')

highlight link CalendarComment Comment

unlet! s:fg_color s:bg_color s:comment_fg_color s:select_color s:is_win32cui s:is_dark
unlet! s:fg_color s:bg_color s:comment_fg_color s:select_color s:space_fg_color s:space_bg_color s:is_win32cui s:is_dark
\ s:today_color s:today_fg_color s:othermonth_fg_color s:weekday_color s:weekday_fg_color
\ s:sunday_bg_color s:sunday_fg_color s:sunday_title_fg_color
\ s:saturday_bg_color s:saturday_fg_color s:saturday_title_fg_color
Expand Down

0 comments on commit 8f6c29b

Please sign in to comment.