diff options
author | v4hn <me@v4hn.de> | 2015-05-14 15:46:07 +0200 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2015-05-15 07:42:40 +0200 |
commit | 8e15887de95a7076b9515dcbb428b364f6dc3849 (patch) | |
tree | 747567f247b29b068361ce499275c3610c7187a1 | |
parent | 89cf0fc597a2bcc16b1516c6f6d750a06175f1c7 (diff) | |
download | st-patched-8e15887de95a7076b9515dcbb428b364f6dc3849.tar.bz2 st-patched-8e15887de95a7076b9515dcbb428b364f6dc3849.tar.xz st-patched-8e15887de95a7076b9515dcbb428b364f6dc3849.zip |
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.
-rw-r--r-- | st.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1069,6 +1069,7 @@ void | |||
1069 | selclear(XEvent *e) { | 1069 | selclear(XEvent *e) { |
1070 | if(sel.ob.x == -1) | 1070 | if(sel.ob.x == -1) |
1071 | return; | 1071 | return; |
1072 | sel.mode = SEL_IDLE; | ||
1072 | sel.ob.x = -1; | 1073 | sel.ob.x = -1; |
1073 | tsetdirt(sel.nb.y, sel.ne.y); | 1074 | tsetdirt(sel.nb.y, sel.ne.y); |
1074 | } | 1075 | } |