Skip to content

Commit 10eae53

Browse files
committed
fix environment check
This plugin requires ① a Vim 7 or higher ② with syntax support ③ capable of displaying enough colours. With the conditional as previously written, has('syntax') being true would short-circuit out of checking for enough colours, effectively removing the check for ③. Factoring out the negations in the conditional turns the NORs into ANDs, which makes its structure much more obvious. This fixes #110.
1 parent 8d640e4 commit 10eae53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/css_color.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Commit: $Format:%H$
44
" Licence: The MIT License (MIT)
55

6-
if v:version < 700 || !( has('syntax') || has('gui_running') || has('nvim') || &t_Co==256 )
6+
if ! ( v:version >= 700 && has('syntax') && ( has('gui_running') || has('nvim') || &t_Co == 256 ) )
77
function! css_color#init(type, keywords, groups)
88
endfunction
99
function! css_color#extend(groups)

0 commit comments

Comments
 (0)