浏览代码

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.
v4hn 9 年之前
父节点
当前提交
8e15887de9
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      st.c

+ 1 - 0
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);
 }