pinosaur
/
st.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87abc7c
)
Use BETWEEN in tinsertblankline and tdeleteline.
author
noname
<noname@inventati.org>
Tue, 22 Apr 2014 17:59:01 +0000
(21:59 +0400)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Wed, 23 Apr 2014 13:39:02 +0000
(15:39 +0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
019f53c
..
92fd7da
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-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