m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

[tcell] 24-bit color support

TAGS=tcell make install

    printf "\x1b[38;2;100;200;250mTRUECOLOR\x1b[m\n" |
        TERM=xterm-truecolor fzf --ansi
This commit is contained in:
Junegunn Choi
2016-11-26 00:36:38 +09:00
parent 6f17f412ba
commit de1c6b8727
4 changed files with 26 additions and 3 deletions

View File

@@ -295,6 +295,10 @@ func RefreshWindows(windows []*Window) {
}
func PairFor(fg Color, bg Color) ColorPair {
// ncurses does not support 24-bit colors
if fg.is24() || bg.is24() {
return ColDefault
}
key := (int(fg) << 8) + int(bg)
if found, prs := _colorMap[key]; prs {
return found