selsort computes the wrong normalized coordinates when rectangular selection is
enabled, causing rectangular selection to only work when going toward either the
top left corner, or the bottom right one.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c
index 506be0f..c75d31b 100644
--- a/st.c
+++ b/st.c
@@ -659,7 +659,7 @@ y2row(int y) {
 
 static void
 selsort(void) {
-       if(sel.ob.y == sel.oe.y) {
+       if(sel.ob.y == sel.oe.y || sel.type == SEL_RECTANGULAR) {
                sel.nb.x = MIN(sel.ob.x, sel.oe.x);
                sel.ne.x = MAX(sel.ob.x, sel.oe.x);
        } else {
-- 
2.0.0


-- 
Ivan "Colona" Delalande

Reply via email to