Commit 8e15887

v4hn <me@v4hn.de>
2015-05-14 09:46:07
set selection to IDLE on clear
Otherwise a tangling bmotion event will consider the selection still valid and selnormalize segfaults because of an invalid sel.ob.y index.
1 parent 89cf0fc
Changed files (1)
st.c
@@ -1069,6 +1069,7 @@ void
 selclear(XEvent *e) {
 	if(sel.ob.x == -1)
 		return;
+	sel.mode = SEL_IDLE;
 	sel.ob.x = -1;
 	tsetdirt(sel.nb.y, sel.ne.y);
 }