summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorColona <colona@ycc.fr>2014-06-03 21:47:55 -0700
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-06-04 21:10:25 +0200
commit6fd887077e29efd789499e06193314d7abdcac38 (patch)
tree63ea922e24edeb97ff9fadd7132b5bedd79b7a2a /st.c
parentbb6dc332067fddcdcb0940ebc9b5f41c61429c46 (diff)
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. Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 2e55963..8b65450 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 {