Xinqi Bao's Git

Render invisible attribute
authorAnders Eurenius <[email protected]>
Sat, 21 Jun 2014 18:30:22 +0000 (20:30 +0200)
committerRoberto E. Vargas Caballero <[email protected]>
Fri, 27 Jun 2014 12:06:21 +0000 (14:06 +0200)
Implement invisible mode by setting the foreground color to be the same
as the background color. Not rendering anything would also be an
alternative, but this seems less likely to cause surprises in
conjunction with any hacks.

Signed-off-by: Roberto E. Vargas Caballero <[email protected]>
st.c

diff --git a/st.c b/st.c
index 9637834..a69cc9e 100644 (file)
--- a/st.c
+++ b/st.c
@@ -3236,6 +3236,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
        if(base.mode & ATTR_BLINK && term.mode & MODE_BLINK)
                fg = bg;
 
+       if(base.mode & ATTR_INVISIBLE)
+               fg = bg;
+
        /* Intelligent cleaning up of the borders. */
        if(x == 0) {
                xclear(0, (y == 0)? 0 : winy, borderpx,