Commit bd468840d4db56198a3d7ce4692711ddc2217771
1 parent
3c656346
fixed LF interpretation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
2 deletions
console.c
... | ... | @@ -619,7 +619,6 @@ static void console_put_lf(TextConsole *s) |
619 | 619 | TextCell *c; |
620 | 620 | int x, y1; |
621 | 621 | |
622 | - s->x = 0; | |
623 | 622 | s->y++; |
624 | 623 | if (s->y >= s->height) { |
625 | 624 | s->y = s->height - 1; |
... | ... | @@ -773,6 +772,7 @@ static void console_putchar(TextConsole *s, int ch) |
773 | 772 | break; |
774 | 773 | case '\t': /* tabspace */ |
775 | 774 | if (s->x + (8 - (s->x % 8)) > s->width) { |
775 | + s->x = 0; | |
776 | 776 | console_put_lf(s); |
777 | 777 | } else { |
778 | 778 | s->x = s->x + (8 - (s->x % 8)); |
... | ... | @@ -791,8 +791,10 @@ static void console_putchar(TextConsole *s, int ch) |
791 | 791 | c->t_attrib = s->t_attrib; |
792 | 792 | update_xy(s, s->x, s->y); |
793 | 793 | s->x++; |
794 | - if (s->x >= s->width) | |
794 | + if (s->x >= s->width) { | |
795 | + s->x = 0; | |
795 | 796 | console_put_lf(s); |
797 | + } | |
796 | 798 | break; |
797 | 799 | } |
798 | 800 | break; | ... | ... |