(wrong string) élien Aptel
changeset: 218:86bb9f2bd0de
parent: 216:fb96d95c5174
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Tue Nov 01 16:33:43 2011 +0100
files: st.c
description:
fix selection. (thx Tarmo Heiskanen)
diff -r fb96d95c5174 -r 86bb9f2bd0de st.c
--- a/st.c Thu Oct 20 23:20:59 2011 +0200
+++ b/st.c Tue Nov 01 16:33:43 2011 +0100
_AT_@ -463,6 +463,9 @@
if(IS_SET(MODE_MOUSE))
mousereport(e);
else if(e->xbutton.button == Button1) {
+ if(sel.bx != -1)
+ for(int i=sel.b.y; i<=sel.e.y; i++)
+ term.dirty[i] = 1;
sel.mode = 1;
sel.ex = sel.bx = X2COL(e->xbutton.x);
sel.ey = sel.by = Y2ROW(e->xbutton.y);
_AT_@ -583,6 +586,7 @@
else if(e->xbutton.button == Button1) {
sel.mode = 0;
getbuttoninfo(e, NULL, &sel.ex, &sel.ey);
+ term.dirty[sel.ey] = 1;
if(sel.bx == sel.ex && sel.by == sel.ey) {
struct timeval now;
sel.bx = -1;
_AT_@ -627,7 +631,9 @@
if(oldey != sel.ey || oldex != sel.ex) {
int starty = MIN(oldey, sel.ey);
int endy = MAX(oldey, sel.ey);
- drawregion(0, (starty > 0 ? starty : 0), term.col, (endy < term.row ? endy+1 : term.row));
+ for(int i=starty; i<=endy; i++)
+ term.dirty[i] = 1;
+ draw();
}
}
}
Received on Tue Nov 01 2011 - 15:38:23 CET
This archive was generated by hypermail 2.3.0
: Tue Nov 01 2011 - 15:48:08 CET