[dev] [PATCH] Fix selecting clearing and BCE

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Wed, 24 Apr 2013 01:40:13 +0200

From: "Roberto E. Vargas Caballero" <k0ga_AT_shike2.com>

The commit b78c5085f72 changed the st behaviour enabling BCE capability,
that means erase regions using background color. Problem comes when you
clear a region with a selection, because in this case the real mode of the
Glyph is not the value of term.line[y][x], due in drawregion we had enabled
the ATTR_REVERSE bit.
---
 st.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/st.c b/st.c
index f593302..90849da 100644
--- a/st.c
+++ b/st.c
_AT_@ -1424,6 +1424,8 @@ tclearregion(int x1, int y1, int x2, int y2) {
 	for(y = y1; y <= y2; y++) {
 		term.dirty[y] = 1;
 		for(x = x1; x <= x2; x++) {
+			if(selected(x, y))
+				selclear(NULL);
 			term.line[y][x] = term.c.attr;
 			memcpy(term.line[y][x].c, " ", 2);
 		}
-- 
1.7.10.4
Received on Wed Apr 24 2013 - 01:40:13 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 24 2013 - 01:48:04 CEST