diff options
author | Oliver Kiddle <okiddle@yahoo.co.uk> | 2018-11-05 22:24:10 +0100 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2018-11-05 22:24:12 +0100 |
commit | 50597692e021ee071b971e13a14dde5b22d31639 (patch) | |
tree | f74091a18120948924023914b0f5198331bdb243 /Src/Modules | |
parent | 37d0005a9e651f366076c930019464d162506a57 (diff) | |
download | zsh-50597692e021ee071b971e13a14dde5b22d31639.tar.gz zsh-50597692e021ee071b971e13a14dde5b22d31639.tar.xz zsh-50597692e021ee071b971e13a14dde5b22d31639.zip |
43759: add support for true colour terminals
Diffstat (limited to 'Src/Modules')
-rw-r--r-- | Src/Modules/nearcolor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/Modules/nearcolor.c b/Src/Modules/nearcolor.c index 2a763d470..128658e20 100644 --- a/Src/Modules/nearcolor.c +++ b/Src/Modules/nearcolor.c @@ -118,10 +118,12 @@ static int getnearestcolor(UNUSED(Hookdef dummy), Color_rgb col) { if (tccolours == 256) - return mapRGBto256(col->red, col->green, col->blue); + return mapRGBto256(col->red, col->green, col->blue) + 1; if (tccolours == 88) - return mapRGBto88(col->red, col->green, col->blue); - return 0; + return mapRGBto88(col->red, col->green, col->blue) + 1; + /* returning 1 indicates black rather than failure (0) so this + * module still serves to prevent fallback on true color */ + return 1; } static struct features module_features = { |