---
 st.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/st.c b/st.c
index 8a28df0..62b0889 100644
--- a/st.c
+++ b/st.c
@@ -683,8 +683,6 @@ tlinelen(int y) {
 
 void
 selnormalize(void) {
-       int i;
-
        if(sel.type == SEL_REGULAR && sel.ob.y != sel.oe.y) {
                sel.nb.x = sel.ob.y < sel.oe.y ? sel.ob.x : sel.oe.x;
                sel.ne.x = sel.ob.y < sel.oe.y ? sel.oe.x : sel.ob.x;
@@ -699,13 +697,13 @@ selnormalize(void) {
        selsnap(&sel.ne.x, &sel.ne.y, +1);
 
        /* expand selection over line breaks */
-       if (sel.type == SEL_RECTANGULAR)
-               return;
-       i = tlinelen(sel.nb.y);
-       if (i < sel.nb.x)
-               sel.nb.x = i;
-       if (tlinelen(sel.ne.y) <= sel.ne.x)
-               sel.ne.x = term.col - 1;
+       if(sel.type == SEL_REGULAR) {
+               int len = tlinelen(sel.nb.y);
+               if(len < sel.nb.x)
+                       sel.nb.x = len;
+               if(tlinelen(sel.ne.y) <= sel.ne.x)
+                       sel.ne.x = term.col - 1;
+       }
 }
 
 bool
-- 
1.8.4


Reply via email to