summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurélien Aptel2010-10-14 19:21:12 +0200
committerAurélien Aptel2010-10-14 19:21:12 +0200
commit9e004846def39ee73eeb06ba9b1be0e389752441 (patch)
treef670d15a194bc65977443a571eb0d0e3b4e14c4a
parent68d8fcf62a4f016c0292db543c1c2e694afc5b54 (diff)
downloadst-9e004846def39ee73eeb06ba9b1be0e389752441.tar.gz
st-9e004846def39ee73eeb06ba9b1be0e389752441.tar.xz
st-9e004846def39ee73eeb06ba9b1be0e389752441.zip
fixed newline bug.
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
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