mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 07:15:59 +01:00
Use BETWEEN in tinsertblankline and tdeleteline.
This commit is contained in:
parent
87abc7cd59
commit
f21e47f44a
1 changed files with 4 additions and 8 deletions
12
st.c
12
st.c
|
@ -1628,18 +1628,14 @@ tinsertblank(int n) {
|
||||||
|
|
||||||
void
|
void
|
||||||
tinsertblankline(int n) {
|
tinsertblankline(int n) {
|
||||||
if(term.c.y < term.top || term.c.y > term.bot)
|
if(BETWEEN(term.c.y, term.top, term.bot))
|
||||||
return;
|
tscrolldown(term.c.y, n);
|
||||||
|
|
||||||
tscrolldown(term.c.y, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
tdeleteline(int n) {
|
tdeleteline(int n) {
|
||||||
if(term.c.y < term.top || term.c.y > term.bot)
|
if(BETWEEN(term.c.y, term.top, term.bot))
|
||||||
return;
|
tscrollup(term.c.y, n);
|
||||||
|
|
||||||
tscrollup(term.c.y, n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
|
|
Loading…
Reference in a new issue