From e96b6b6d1c4012d457920d83659b96d22ed632bc Mon Sep 17 00:00:00 2001 From: Lifepillar Date: Wed, 20 Jun 2018 09:05:06 +0200 Subject: [PATCH] Automatically fallback to 16 colors when t_Co < 256. --- colors/solarized8.vim | 4 ++-- colors/solarized8_flat.vim | 4 ++-- colors/solarized8_high.vim | 4 ++-- colors/solarized8_low.vim | 4 ++-- doc/solarized8.txt | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/colors/solarized8.vim b/colors/solarized8.vim index 5a481bb..de25b1a 100644 --- a/colors/solarized8.vim +++ b/colors/solarized8.vim @@ -4,10 +4,10 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Mon 07 May 2018 12:48:23 PM CEST +" Last Updated: Wed Jun 20 09:03:07 2018 if !(has('termguicolors') && &termguicolors) && !has('gui_running') - \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) + \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', &t_Co < 256) ? 16 : 256)) echoerr '[Solarized 8] There are not enough colors.' finish endif diff --git a/colors/solarized8_flat.vim b/colors/solarized8_flat.vim index 69b50aa..50983e3 100644 --- a/colors/solarized8_flat.vim +++ b/colors/solarized8_flat.vim @@ -4,10 +4,10 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Mon 07 May 2018 12:48:27 PM CEST +" Last Updated: Wed Jun 20 09:03:11 2018 if !(has('termguicolors') && &termguicolors) && !has('gui_running') - \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) + \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', &t_Co < 256) ? 16 : 256)) echoerr '[Solarized 8 Flat] There are not enough colors.' finish endif diff --git a/colors/solarized8_high.vim b/colors/solarized8_high.vim index 6306a9c..335b072 100644 --- a/colors/solarized8_high.vim +++ b/colors/solarized8_high.vim @@ -4,10 +4,10 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Mon 07 May 2018 12:48:30 PM CEST +" Last Updated: Wed Jun 20 09:03:14 2018 if !(has('termguicolors') && &termguicolors) && !has('gui_running') - \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) + \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', &t_Co < 256) ? 16 : 256)) echoerr '[Solarized 8 High Contrast] There are not enough colors.' finish endif diff --git a/colors/solarized8_low.vim b/colors/solarized8_low.vim index d30d168..3ed2273 100644 --- a/colors/solarized8_low.vim +++ b/colors/solarized8_low.vim @@ -4,10 +4,10 @@ " Maintainer: Lifepillar " Website: https://github.com/lifepillar/vim-solarized8 " License: OSI approved MIT license -" Last Updated: Mon 07 May 2018 12:48:34 PM CEST +" Last Updated: Wed Jun 20 09:03:17 2018 if !(has('termguicolors') && &termguicolors) && !has('gui_running') - \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', 0) ? 16 : 256)) + \ && (!exists('&t_Co') || &t_Co < (get(g:, 'solarized_use16', &t_Co < 256) ? 16 : 256)) echoerr '[Solarized 8 Low Contrast] There are not enough colors.' finish endif diff --git a/doc/solarized8.txt b/doc/solarized8.txt index c63482f..fc49d47 100644 --- a/doc/solarized8.txt +++ b/doc/solarized8.txt @@ -71,7 +71,7 @@ Tweak the visibility of a few elements. Allowed values are `"normal"` Solarized 8 other options *solarized8-other-options* *g:solarized_use16* -Set to 1 if you want to use 16 colors. +Set to 1 if you want to force the use of 16 colors. > let g:solarized_use16 = 0 <