Explorar o código

Making rectangular selection work again.

People sending me patches against strange revisions and basing on their own
revisions make me having to reapply them. Then such errors appear.

Thanks Alexander Sedov <alex0player@gmail.com> for noticing this.
Christoph Lohmann %!s(int64=12) %!d(string=hai) anos
pai
achega
4b17dddb10
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      st.c

+ 1 - 4
st.c

@@ -649,13 +649,10 @@ selected(int x, int y) {
 	if(sel.ey == y && sel.by == y) {
 		bx = MIN(sel.bx, sel.ex);
 		ex = MAX(sel.bx, sel.ex);
+
 		return BETWEEN(x, bx, ex);
 	}
 
-	return ((sel.b.y < y && y < sel.e.y)
-			|| (y == sel.e.y && x <= sel.e.x))
-			|| (y == sel.b.y && x >= sel.b.x
-				&& (x <= sel.e.x || sel.b.y != sel.e.y));
 	switch(sel.type) {
 	case SEL_REGULAR:
 		return ((sel.b.y < y && y < sel.e.y)