|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 378c4eed029eb37eec31e56bd82ca5df2dee1e73 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: David Herrmann <dh.herrmann@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sun, 5 Oct 2014 15:48:32 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] terminal/subterm: leave bold-light conversion to parent
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
We rely on the parent terminal to do color conversion, so also leave
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
bold->light conversion to the parent. Otherwise, it will be performed
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
twice and we might apply it on the wrong color.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd-terminal/subterm.c | 5 +----
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd-terminal/subterm.c b/src/libsystemd-terminal/subterm.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index dda6759709..93c06bea83 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd-terminal/subterm.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd-terminal/subterm.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -428,10 +428,7 @@ static int output_draw_cell_fn(term_screen *screen,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
output_printf(o, "\e[38;2;%u;%u;%um", attr->fg.red, attr->fg.green, attr->fg.blue);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
case TERM_CCODE_BLACK ... TERM_CCODE_WHITE:
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- if (attr->bold)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 90);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- else
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 30);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_BLACK + 30);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
case TERM_CCODE_LIGHT_BLACK ... TERM_CCODE_LIGHT_WHITE:
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
output_printf(o, "\e[%um", attr->fg.ccode - TERM_CCODE_LIGHT_BLACK + 90);
|