summaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--st.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/st.c b/st.c
index 7f53981..92854b4 100644
--- a/st.c
+++ b/st.c
@@ -1410,7 +1410,7 @@ tsetchar(char *c, Glyph *attr, int x, int y) {
1410 1410
1411void 1411void
1412tclearregion(int x1, int y1, int x2, int y2) { 1412tclearregion(int x1, int y1, int x2, int y2) {
1413 int x, y, temp; 1413 int x, y, temp, mask;
1414 1414
1415 if(x1 > x2) 1415 if(x1 > x2)
1416 temp = x1, x1 = x2, x2 = temp; 1416 temp = x1, x1 = x2, x2 = temp;
@@ -1425,7 +1425,9 @@ tclearregion(int x1, int y1, int x2, int y2) {
1425 for(y = y1; y <= y2; y++) { 1425 for(y = y1; y <= y2; y++) {
1426 term.dirty[y] = 1; 1426 term.dirty[y] = 1;
1427 for(x = x1; x <= x2; x++) { 1427 for(x = x1; x <= x2; x++) {
1428 mask = selected(x, y) ? ATTR_REVERSE : 0;
1428 term.line[y][x] = term.c.attr; 1429 term.line[y][x] = term.c.attr;
1430 term.line[y][x].mode ^= mask;
1429 memcpy(term.line[y][x].c, " ", 2); 1431 memcpy(term.line[y][x].c, " ", 2);
1430 } 1432 }
1431 } 1433 }