mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-24 16:05:47 +01:00
Simplify tmoveto.
LIMIT returns value. This fact is already used in x2col and y2row.
This commit is contained in:
parent
9d1495f9ee
commit
b0310fba5d
1 changed files with 2 additions and 4 deletions
6
st.c
6
st.c
|
@ -1571,11 +1571,9 @@ tmoveto(int x, int y) {
|
||||||
miny = 0;
|
miny = 0;
|
||||||
maxy = term.row - 1;
|
maxy = term.row - 1;
|
||||||
}
|
}
|
||||||
LIMIT(x, 0, term.col-1);
|
|
||||||
LIMIT(y, miny, maxy);
|
|
||||||
term.c.state &= ~CURSOR_WRAPNEXT;
|
term.c.state &= ~CURSOR_WRAPNEXT;
|
||||||
term.c.x = x;
|
term.c.x = LIMIT(x, 0, term.col-1);
|
||||||
term.c.y = y;
|
term.c.y = LIMIT(y, miny, maxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue