st
simple terminal
git clone https://9o.is/git/st.git
commit 4899f20f079ed4568015a162b6662b2d746f2a4d parent 881031d1d6e3991a4e06fb989b370a455d8f199b Author: noname@inventati.org <noname@inventati.org> Date: Mon, 13 Apr 2015 14:03:51 +0200 Simplify tmoveto. LIMIT returns value. This fact is already used in x2col and y2row. Diffstat:
| M | st.c | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git 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