[hackers] [st] Making rectangular selection work again. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Wed, 20 Mar 2013 21:21:47 +0100

commit 4b17dddb104bd2ac87dd6e334aafd325197c1407
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed Mar 20 21:19:28 2013 +0100

    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_AT_gmail.com> for noticing this.

diff --git a/st.c b/st.c
index 0923cec..131cba8 100644
--- a/st.c
+++ b/st.c
_AT_@ -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)
Received on Wed Mar 20 2013 - 21:21:47 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 20 2013 - 21:24:09 CET