aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmadeusz Sławiński2014-01-03 15:24:24 +0100
committerRoberto E. Vargas Caballero2014-01-03 15:28:16 +0100
commit6310cfa9ada297630454097978605aa5d184dd46 (patch)
tree9eecb01985f1c8d395e92a6efd74d7572c69f4ac
parent73d4357f7512f20a493ed81aba2df76f4c0da569 (diff)
downloadaur-6310cfa9ada297630454097978605aa5d184dd46.tar.gz
Fix truecolor escapes, when both bg and fg are set
for example echo -e "\e[48;2;255;0;0m\e[38;2;0;0;255m test " should render on red bg with blue fg also now elinks works correctly when using 'truecolor' option in preferences Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
-rw-r--r--st.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/st.c b/st.c
index 82bfd3d3a029..4d543d19627f 100644
--- a/st.c
+++ b/st.c
@@ -3083,6 +3083,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
base.fg = defaultunderline;
}
if(IS_TRUECOL(base.fg)) {
+ colfg.alpha = 0xffff;
colfg.red = TRUERED(base.fg);
colfg.green = TRUEGREEN(base.fg);
colfg.blue = TRUEBLUE(base.fg);
@@ -3093,6 +3094,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
}
if(IS_TRUECOL(base.bg)) {
+ colbg.alpha = 0xffff;
colbg.green = TRUEGREEN(base.bg);
colbg.red = TRUERED(base.bg);
colbg.blue = TRUEBLUE(base.bg);