From 5822a9fe61a7d4385e9a90f2211a9b6665c797cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Aptel?= Date: Thu, 14 Oct 2010 19:21:12 +0200 Subject: fixed newline bug. --- st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/st.c b/st.c index 0042204..0c6423a 100644 --- a/st.c +++ b/st.c @@ -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 -- cgit v1.2.1