chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
378c4ee
)
terminal/screen: perform bold->light conversion only on foreground
author
David Herrmann
<dh.herrmann@gmail.com>
Sun, 5 Oct 2014 13:49:26 +0000
(15:49 +0200)
committer
David Herrmann
<dh.herrmann@gmail.com>
Sun, 5 Oct 2014 13:49:26 +0000
(15:49 +0200)
Bold glyphs always use light colors. However, this color conversion is
limited to the foreground color, so skip it for backgrounds.
src/libsystemd-terminal/term-parser.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-terminal/term-parser.c
b/src/libsystemd-terminal/term-parser.c
index 8ec6345d601d41865bcefb39f21e75f80165373a..d8206a46ba30872af7513f8c36cf3cbabab7eec4 100644
(file)
--- a/
src/libsystemd-terminal/term-parser.c
+++ b/
src/libsystemd-terminal/term-parser.c
@@
-100,8
+100,8
@@
static uint32_t term_color_to_argb32(const term_color *color, const term_attr *a
case TERM_CCODE_BLACK ... TERM_CCODE_LIGHT_WHITE:
t = color->ccode - TERM_CCODE_BLACK;
- /* bold causes light colors */
- if (t < 8 && attr->bold)
+ /* bold causes light colors
(only for foreground colors)
*/
+ if (t < 8 && attr->bold
&& color == &attr->fg
)
t += 8;
r = palette[t * 3 + 0];