Skip to content

Commit

Permalink
update calendar/color.vim, syntax/calendar.vim: support termguicolors (
Browse files Browse the repository at this point in the history
…close #135)
  • Loading branch information
itchyny committed Mar 12, 2018
1 parent 25009a8 commit 1aee272
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions autoload/calendar/color.vim
Expand Up @@ -2,15 +2,15 @@
" Filename: autoload/calendar/color.vim
" Author: itchyny
" License: MIT License
" Last Change: 2017/05/19 08:53:05.
" Last Change: 2018/03/12 18:49:09.
" =============================================================================

let s:save_cpo = &cpo
set cpo&vim

" Color utility

let s:is_gui = has('gui_running')
let s:is_gui = has('gui_running') || (has('termguicolors') && &termguicolors)
let s:is_cterm = !s:is_gui
let s:is_win32cui = (has('win32') || has('win64')) && !s:is_gui
let s:term = s:is_gui ? 'gui' : 'cterm'
Expand Down
7 changes: 4 additions & 3 deletions syntax/calendar.vim
Expand Up @@ -2,7 +2,7 @@
" Filename: syntax/calendar.vim
" Author: itchyny
" License: MIT License
" Last Change: 2017/04/26 22:14:34.
" Last Change: 2018/03/12 18:49:05.
" =============================================================================

if version < 700
Expand All @@ -14,14 +14,15 @@ endif
let s:save_cpo = &cpo
set cpo&vim

let s:is_gui = has('gui_running') || (has('termguicolors') && &termguicolors)
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:is_win32cui = (has('win32') || has('win64')) && !has('gui_running')
let s:is_win32cui = (has('win32') || has('win64')) && !s:is_gui
let s:is_dark = calendar#color#is_dark()

if !has('gui_running')
if !s:is_gui
if s:is_win32cui
if s:is_dark
let s:select_color = 8
Expand Down

0 comments on commit 1aee272

Please sign in to comment.