Choose to use 256-colors when $TERM includes 256 (related: #18)

It turned out that Curses.can_change_color? returns false when $TERM is
set to screen-256color, which is perfectly capable of rendering 256
colors.
This commit is contained in:
Junegunn Choi 2014-02-20 13:38:04 +09:00
parent 4396ab7548
commit b711d76b8e

2
fzf
View File

@ -514,7 +514,7 @@ class FZF
C.noecho
if @color
if C.can_change_color? && ENV['TERM'].to_s =~ /256/
if ENV['TERM'].to_s =~ /256/
C.init_pair 1, 110, dbg
C.init_pair 2, 108, dbg
C.init_pair 3, 254, 236