From 3823c33f284a9c11d3db7a020957775b6d59d4e3 Mon Sep 17 00:00:00 2001 From: v4hn Date: Thu, 14 May 2015 15:36:57 +0200 Subject: [PATCH] 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. --- st.c | 1 + 1 file changed, 1 insertion(+) diff --git a/st.c b/st.c index 55a5c56..0cad879 100644 --- a/st.c +++ b/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); } -- 2.4.0