diff options
| author | Christoph Lohmann <20h@r-36.net> | 2013-04-24 21:30:59 +0200 |
|---|---|---|
| committer | Christoph Lohmann <20h@r-36.net> | 2013-04-24 21:30:59 +0200 |
| commit | 0851f2be2ab48ee3a67ef2287c09bd67622dcd8e (patch) | |
| tree | 8440b40c9940e6e2e1f7c17f1d0ed1ef407c5ea3 | |
| parent | 011c0f9e5bb87838afa90f2a33ba68920681e3ce (diff) | |
| download | st-0851f2be2ab48ee3a67ef2287c09bd67622dcd8e.tar.gz st-0851f2be2ab48ee3a67ef2287c09bd67622dcd8e.zip | |
Fixing the selection issue in altscreens.
| -rw-r--r-- | st.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1410,7 +1410,7 @@ tsetchar(char *c, Glyph *attr, int x, int y) { | |||
| 1410 | 1410 | ||
| 1411 | void | 1411 | void |
| 1412 | tclearregion(int x1, int y1, int x2, int y2) { | 1412 | tclearregion(int x1, int y1, int x2, int y2) { |
| 1413 | int x, y, temp, mask; | 1413 | int x, y, temp; |
| 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,9 +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 | if(selected(x, y)) |
| 1429 | selclear(NULL); | ||
| 1429 | term.line[y][x] = term.c.attr; | 1430 | term.line[y][x] = term.c.attr; |
| 1430 | term.line[y][x].mode ^= mask; | ||
| 1431 | memcpy(term.line[y][x].c, " ", 2); | 1431 | memcpy(term.line[y][x].c, " ", 2); |
| 1432 | } | 1432 | } |
| 1433 | } | 1433 | } |
