diff options
author | Christoph Lohmann <20h@r-36.net> | 2013-03-20 21:19:28 +0100 |
---|---|---|
committer | Christoph Lohmann <20h@r-36.net> | 2013-03-20 21:19:28 +0100 |
commit | 4b17dddb104bd2ac87dd6e334aafd325197c1407 (patch) | |
tree | 9b281e44eb99184afe8462b468d81ded4c0d9202 | |
parent | 55adf0aad1d5acf0b9a00e2a9f834cef8b61b3b3 (diff) | |
download | st-4b17dddb104bd2ac87dd6e334aafd325197c1407.tar.gz st-4b17dddb104bd2ac87dd6e334aafd325197c1407.tar.bz2 |
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.
-rw-r--r-- | st.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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) |