[hackers] [st] Fixing the selection issue in altscreens. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Wed, 24 Apr 2013 21:32:50 +0200

commit 0851f2be2ab48ee3a67ef2287c09bd67622dcd8e
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed Apr 24 21:30:59 2013 +0200

    Fixing the selection issue in altscreens.

diff --git a/st.c b/st.c
index 8e9e895..c0a4780 100644
--- a/st.c
+++ b/st.c
_AT_@ -1410,7 +1410,7 @@ tsetchar(char *c, Glyph *attr, int x, int y) {
 
 void
 tclearregion(int x1, int y1, int x2, int y2) {
- int x, y, temp, mask;
+ int x, y, temp;
 
         if(x1 > x2)
                 temp = x1, x1 = x2, x2 = temp;
_AT_@ -1425,9 +1425,9 @@ 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++) {
- mask = selected(x, y) ? ATTR_REVERSE : 0;
+ if(selected(x, y))
+ selclear(NULL);
                         term.line[y][x] = term.c.attr;
- term.line[y][x].mode ^= mask;
                         memcpy(term.line[y][x].c, " ", 2);
                 }
         }
Received on Wed Apr 24 2013 - 21:32:50 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 24 2013 - 21:36:14 CEST