aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2010-10-14 19:21:12 +0200
committerAurélien Aptel <aurelien.aptel@gmail.com>2010-10-14 19:21:12 +0200
commit9e004846def39ee73eeb06ba9b1be0e389752441 (patch)
treef670d15a194bc65977443a571eb0d0e3b4e14c4a /st.c
parent68d8fcf62a4f016c0292db543c1c2e694afc5b54 (diff)
downloadst-9e004846def39ee73eeb06ba9b1be0e389752441.tar.gz
st-9e004846def39ee73eeb06ba9b1be0e389752441.zip
fixed newline bug.
Diffstat (limited to 'st.c')
-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) {
627 627
628void 628void
629tnewline(void) { 629tnewline(void) {
630 int x = term.c.x+1 < term.col ? term.c.x : 0;
630 int y = term.c.y; 631 int y = term.c.y;
631 if(term.c.y == term.bot) 632 if(term.c.y == term.bot)
632 tscrollup(term.top, 1); 633 tscrollup(term.top, 1);
633 else 634 else
634 y++; 635 y++;
635 tmoveto(0, y); 636 tmoveto(x, y);
636} 637}
637 638
638void 639void