[hackers] [st] Fix truecolor escapes, when both bg and fg are set || Amadeusz Sławiński

From: <git_AT_suckless.org>
Date: Fri, 03 Jan 2014 15:28:53 +0100

commit 9df9a4723dedf4f5e12c954376c4931a6976b918
Author: Amadeusz Sławiński <amade_AT_asmblr.net>
Date: Fri Jan 3 15:24:24 2014 +0100

    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_AT_asmblr.net>

diff --git a/st.c b/st.c
index 82bfd3d..4d543d1 100644
--- a/st.c
+++ b/st.c
_AT_@ -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);
_AT_@ -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);
Received on Fri Jan 03 2014 - 15:28:53 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 03 2014 - 15:36:19 CET