aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoname@inventati.org <noname@inventati.org>2015-04-13 14:03:51 +0200
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2015-04-13 15:15:47 +0200
commitb0310fba5de0c519eae0c8a2817ccc7bfcdd5222 (patch)
treeb909600673d3617d6bc1f9f2a42e8a7227ab9793
parent9d1495f9eeee993a480c7ab1755803d081d794e6 (diff)
downloadst-b0310fba5de0c519eae0c8a2817ccc7bfcdd5222.tar.gz
st-b0310fba5de0c519eae0c8a2817ccc7bfcdd5222.tar.bz2
st-b0310fba5de0c519eae0c8a2817ccc7bfcdd5222.zip
Simplify tmoveto.
LIMIT returns value. This fact is already used in x2col and y2row.
-rw-r--r--st.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/st.c b/st.c
index 0558593..79bb6aa 100644
--- a/st.c
+++ b/st.c
@@ -1571,11 +1571,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