mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 07:15:59 +01:00
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>
This commit is contained in:
parent
bb6dc33206
commit
6fd887077e
1 changed files with 1 additions and 1 deletions
2
st.c
2
st.c
|
@ -670,7 +670,7 @@ static void
|
||||||
selnormalize(void) {
|
selnormalize(void) {
|
||||||
int i;
|
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.nb.x = MIN(sel.ob.x, sel.oe.x);
|
||||||
sel.ne.x = MAX(sel.ob.x, sel.oe.x);
|
sel.ne.x = MAX(sel.ob.x, sel.oe.x);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue