[dev] [st] [PATCH 3/3] Simplify tmoveto.

From: noname <noname_AT_inventati.org>
Date: Mon, 13 Apr 2015 12:03:30 +0000

LIMIT returns value. This fact is already used in x2col and y2row.
---
 st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index e01df66..33fd4de 100644
--- a/st.c
+++ b/st.c
_AT_@ -1572,11 +1572,9 @@ tmoveto(int x, int y) {
 		miny = 0;
 		maxy = term.row - 1;
 	}
-	LIMIT(x, 0, term.col-1);
-	LIMIT(y, miny, maxy);
 	term.c.state &= ~CURSOR_WRAPNEXT;
-	term.c.x = x;
-	term.c.y = y;
+	term.c.x = LIMIT(x, 0, term.col-1);
+	term.c.y = LIMIT(y, miny, maxy);
 }
 
 void
-- 
1.8.4
Received on Mon Apr 13 2015 - 14:03:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 13 2015 - 14:12:18 CEST