aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2014-01-03 15:24:24 +0100
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-01-03 15:28:16 +0100
commit9df9a4723dedf4f5e12c954376c4931a6976b918 (patch)
tree21af7dd2f4e64052c618755d8c3da527a2e244e2
parente8dba89164fe70647a413b8568b545ff2d887a78 (diff)
downloadst-patched-9df9a4723dedf4f5e12c954376c4931a6976b918.tar.bz2
st-patched-9df9a4723dedf4f5e12c954376c4931a6976b918.tar.xz
st-patched-9df9a4723dedf4f5e12c954376c4931a6976b918.zip
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 82bfd3d..4d543d1 100644
--- a/st.c
+++ b/st.c
@@ -3083,6 +3083,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
3083 base.fg = defaultunderline; 3083 base.fg = defaultunderline;
3084 } 3084 }
3085 if(IS_TRUECOL(base.fg)) { 3085 if(IS_TRUECOL(base.fg)) {
3086 colfg.alpha = 0xffff;
3086 colfg.red = TRUERED(base.fg); 3087 colfg.red = TRUERED(base.fg);
3087 colfg.green = TRUEGREEN(base.fg); 3088 colfg.green = TRUEGREEN(base.fg);
3088 colfg.blue = TRUEBLUE(base.fg); 3089 colfg.blue = TRUEBLUE(base.fg);
@@ -3093,6 +3094,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
3093 } 3094 }
3094 3095
3095 if(IS_TRUECOL(base.bg)) { 3096 if(IS_TRUECOL(base.bg)) {
3097 colbg.alpha = 0xffff;
3096 colbg.green = TRUEGREEN(base.bg); 3098 colbg.green = TRUEGREEN(base.bg);
3097 colbg.red = TRUERED(base.bg); 3099 colbg.red = TRUERED(base.bg);
3098 colbg.blue = TRUEBLUE(base.bg); 3100 colbg.blue = TRUEBLUE(base.bg);