Render invisible attribute

    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.

cheers
aes
From f006ec9c526893d65d798b1ed94b650b925d2c30 Mon Sep 17 00:00:00 2001
From: Anders Eurenius <a...@spotify.com>
Date: Sat, 21 Jun 2014 20:30:22 +0200
Subject: [PATCH 2/8] Render invisible attribute

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.
---
 st.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/st.c b/st.c
index 4ffb3df..2083d42 100644
--- 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,
-- 
2.0.0

Reply via email to