Browse Source

Use BETWEEN in tinsertblankline and tdeleteline.

master
noname 10 years ago
committed by Roberto E. Vargas Caballero
parent
commit
f21e47f44a
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      st.c

+ 4
- 8
st.c View File

@ -1628,18 +1628,14 @@ tinsertblank(int n) {
void
tinsertblankline(int n) {
if(term.c.y < term.top || term.c.y > term.bot)
return;
tscrolldown(term.c.y, n);
if(BETWEEN(term.c.y, term.top, term.bot))
tscrolldown(term.c.y, n);
}
void
tdeleteline(int n) {
if(term.c.y < term.top || term.c.y > term.bot)
return;
tscrollup(term.c.y, n);
if(BETWEEN(term.c.y, term.top, term.bot))
tscrollup(term.c.y, n);
}
int32_t


Loading…
Cancel
Save