diff options
| -rw-r--r-- | st.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -627,12 +627,13 @@ tscrollup(int orig, int n) { | |||
| 627 | 627 | ||
| 628 | void | 628 | void |
| 629 | tnewline(void) { | 629 | tnewline(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 | ||
| 638 | void | 639 | void |
