mirror of
https://github.com/alrayyes/st.git
synced 2024-11-26 04:46:22 +00:00
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.
This commit is contained in:
parent
89cf0fc597
commit
8e15887de9
1 changed files with 1 additions and 0 deletions
1
st.c
1
st.c
|
@ -1069,6 +1069,7 @@ void
|
||||||
selclear(XEvent *e) {
|
selclear(XEvent *e) {
|
||||||
if(sel.ob.x == -1)
|
if(sel.ob.x == -1)
|
||||||
return;
|
return;
|
||||||
|
sel.mode = SEL_IDLE;
|
||||||
sel.ob.x = -1;
|
sel.ob.x = -1;
|
||||||
tsetdirt(sel.nb.y, sel.ne.y);
|
tsetdirt(sel.nb.y, sel.ne.y);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue