changeset: 99:d115d5fd5abf
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sun Aug 29 12:27:59 2010 +0200
files: st.c
description:
merged tscroll() with tscrollup().
diff -r e4b926c50b0b -r d115d5fd5abf st.c
--- a/st.c Sat Aug 28 03:18:22 2010 +0200
+++ b/st.c Sun Aug 29 12:27:59 2010 +0200
@@ -149,7 +149,6 @@
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 @@
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 @@
tnewline(void) {
int y = term.c.y + 1;
if(y > term.bot)
- tscroll(), y = term.bot;
+ tscrollup(1), y = term.bot;
tmoveto(0, y);
}
Received on Sun Aug 29 2010 - 18:16:33 CEST
This archive was generated by hypermail 2.2.0 : Sun Aug 29 2010 - 18:24:03 CEST