fixed newline bug.

This commit is contained in:
Aurélien Aptel 2010-10-14 19:21:12 +02:00
parent 9daaad2214
commit 5822a9fe61
1 changed files with 2 additions and 1 deletions

3
st.c
View File

@ -627,12 +627,13 @@ tscrollup(int orig, int n) {
void
tnewline(void) {
int x = term.c.x+1 < term.col ? term.c.x : 0;
int y = term.c.y;
if(term.c.y == term.bot)
tscrollup(term.top, 1);
else
y++;
tmoveto(0, y);
tmoveto(x, y);
}
void