diff options
| author | noname <noname@inventati.org> | 2014-04-22 21:59:01 +0400 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-04-23 15:39:02 +0200 |
| commit | f21e47f44a11b9a24a5d5081fea46f5b5f02eadf (patch) | |
| tree | 7233376020b5a4cf0d81f0ed8183b20e01c64299 /st.c | |
| parent | 87abc7cd596ca34a2e664f1c762f8b69b82eba40 (diff) | |
| download | st-f21e47f44a11b9a24a5d5081fea46f5b5f02eadf.tar.gz st-f21e47f44a11b9a24a5d5081fea46f5b5f02eadf.zip | |
Use BETWEEN in tinsertblankline and tdeleteline.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 12 |
1 files changed, 4 insertions, 8 deletions
| @@ -1628,18 +1628,14 @@ tinsertblank(int n) { | |||
| 1628 | 1628 | ||
| 1629 | void | 1629 | void |
| 1630 | tinsertblankline(int n) { | 1630 | tinsertblankline(int n) { |
| 1631 | if(term.c.y < term.top || term.c.y > term.bot) | 1631 | if(BETWEEN(term.c.y, term.top, term.bot)) |
| 1632 | return; | 1632 | tscrolldown(term.c.y, n); |
| 1633 | |||
| 1634 | tscrolldown(term.c.y, n); | ||
| 1635 | } | 1633 | } |
| 1636 | 1634 | ||
| 1637 | void | 1635 | void |
| 1638 | tdeleteline(int n) { | 1636 | tdeleteline(int n) { |
| 1639 | if(term.c.y < term.top || term.c.y > term.bot) | 1637 | if(BETWEEN(term.c.y, term.top, term.bot)) |
| 1640 | return; | 1638 | tscrollup(term.c.y, n); |
| 1641 | |||
| 1642 | tscrollup(term.c.y, n); | ||
| 1643 | } | 1639 | } |
| 1644 | 1640 | ||
| 1645 | int32_t | 1641 | int32_t |
