diff options
| author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-10-14 19:21:12 +0200 |
|---|---|---|
| committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-10-14 19:21:12 +0200 |
| commit | 9e004846def39ee73eeb06ba9b1be0e389752441 (patch) | |
| tree | f670d15a194bc65977443a571eb0d0e3b4e14c4a /st.c | |
| parent | replaced memset by loops in tresize(); turns out it's faster. (diff) | |
| download | st-9e004846def39ee73eeb06ba9b1be0e389752441.tar.gz st-9e004846def39ee73eeb06ba9b1be0e389752441.zip | |
fixed newline bug.
Diffstat (limited to 'st.c')
| -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 |
