This patch fixes segfault. To reproduce, start selecting, move your
mouse out of window and back while holding LMB.
diff -r 6c311c25323e st.c
--- a/st.c Wed Jun 08 21:35:58 2011 +0200
+++ b/st.c Thu Jun 09 01:27:14 2011 +0400
@@ -615,7 +615,7 @@
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,
(sel.ey < term.row ? endy+1 : term.row));
+ drawregion(0, (starty > 0 ? starty : 0), term.col,
(endy < term.row ? endy+1 : term.row));
}
}
}