From bf71b1767d1cb04499eab16183b114a7d6395122 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 29 Oct 2013 11:44:02 +0900 Subject: [PATCH] Use default foreground color as well --- fzf | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/fzf b/fzf index 5d5de6e..1e3612b 100755 --- a/fzf +++ b/fzf @@ -230,36 +230,35 @@ end C.init_screen C.start_color -default_bg = +dfg, dbg = if C.respond_to?(:use_default_colors) C.use_default_colors - -1 + [-1, -1] else - 0 + [C::COLOR_WHITE, C::COLOR_BLACK] end C.raw C.noecho if C.can_change_color? fg = ENV.fetch('FZF_FG', 252).to_i bg = ENV.fetch('FZF_BG', 236).to_i - C.init_pair 0, 110, default_bg - C.init_pair 1, 110, default_bg - C.init_pair 2, fg, default_bg - C.init_pair 3, 108, default_bg + C.init_pair 1, 110, dbg + C.init_pair 2, dfg, dbg + C.init_pair 3, 108, dbg C.init_pair 4, fg + 2, bg C.init_pair 5, 151, bg - C.init_pair 6, 148, default_bg - C.init_pair 7, 144, default_bg + C.init_pair 6, 148, dbg + C.init_pair 7, 144, dbg C.init_pair 8, 161, bg else - C.init_pair 1, C::COLOR_BLUE, default_bg - C.init_pair 2, C::COLOR_WHITE, default_bg - C.init_pair 3, C::COLOR_GREEN, default_bg - C.init_pair 4, C::COLOR_YELLOW, default_bg - C.init_pair 5, C::COLOR_GREEN, default_bg - C.init_pair 6, C::COLOR_GREEN, default_bg - C.init_pair 7, C::COLOR_WHITE, default_bg - C.init_pair 8, C::COLOR_RED, default_bg + C.init_pair 1, C::COLOR_BLUE, dbg + C.init_pair 2, C::COLOR_WHITE, dbg + C.init_pair 3, C::COLOR_GREEN, dbg + C.init_pair 4, C::COLOR_YELLOW, dbg + C.init_pair 5, C::COLOR_GREEN, dbg + C.init_pair 6, C::COLOR_GREEN, dbg + C.init_pair 7, C::COLOR_WHITE, dbg + C.init_pair 8, C::COLOR_RED, dbg end def color sym, bold = false