---
 st.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/st.c b/st.c
index aba034f..ede90d5 100644
--- a/st.c
+++ b/st.c
@@ -1765,17 +1765,11 @@ tsetattr(int *attr, int l) {
 
 void
 tsetscroll(int t, int b) {
-       int temp;
-
        LIMIT(t, 0, term.row-1);
        LIMIT(b, 0, term.row-1);
-       if(t > b) {
-               temp = t;
-               t = b;
-               b = temp;
-       }
-       term.top = t;
-       term.bot = b;
+
+       term.top = MIN(t, b);
+       term.bot = MAX(t, b);
 }
 
 void
-- 
1.8.4


Reply via email to