aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-08-29 12:27:59 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-08-29 12:27:59 +0200
commit1def7a177ef0c4858ac0d9dd46269ec7a207b13d (patch)
tree48872a6517bfc15570348969a5c7d69e9210d3bc /st.c
parentcf527c22d59c57a88f721289d6d6100f50541cf2 (diff)
downloadst-1def7a177ef0c4858ac0d9dd46269ec7a207b13d.tar.gz
st-1def7a177ef0c4858ac0d9dd46269ec7a207b13d.tar.bz2
merged tscroll() with tscrollup().
Diffstat (limited to 'st.c')
-rw-r--r--st.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/st.c b/st.c
index 9ca032f..eabc0c5 100644
--- a/st.c
+++ b/st.c
@@ -149,7 +149,6 @@ static void tputc(char);
static void tputs(char*, int);
static void treset(void);
static void tresize(int, int);
-static void tscroll(void);
static void tscrollup(int);
static void tscrolldown(int);
static void tsetattr(int*, int);
@@ -355,18 +354,6 @@ tnew(int col, int row) {
term.line[row] = calloc(term.col, sizeof(Glyph));
}
-/* TODO: Replace with scrollup/scolldown */
-void
-tscroll(void) {
- Line temp = term.line[term.top];
- int i;
-
- for(i = term.top; i < term.bot; i++)
- term.line[i] = term.line[i+1];
- memset(temp, 0, sizeof(Glyph) * term.col);
- term.line[term.bot] = temp;
-}
-
void
tscrolldown (int n) {
int i;
@@ -404,7 +391,7 @@ void
tnewline(void) {
int y = term.c.y + 1;
if(y > term.bot)
- tscroll(), y = term.bot;
+ tscrollup(1), y = term.bot;
tmoveto(0, y);
}