On Tue, Jun 03, 2014 at 11:24:54PM +0200, Roberto E. Vargas Caballero wrote:
> This patch conflicts with your previous patch, so I think there is
> some kind of error here, isn't it?

Yeah, I made this so that it apply cleanly on the head but forgot to
rebase it on my other patch. Here is the fixed version, sorry!

-- 
Ivan "Colona" Delalande
>From 8ebf48cbe5d52822655bddca90289f5552d056d3 Mon Sep 17 00:00:00 2001
From: Colona <col...@ycc.fr>
Date: Tue, 3 Jun 2014 21:47:55 -0700
Subject: [PATCH] Fix rectangular selection.

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 ce06ed3..e0c64e3 100644
--- a/st.c
+++ b/st.c
@@ -670,7 +670,7 @@ static void
 selnormalize(void) {
 	int i;
 
-	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

Reply via email to