aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-14 20:24:31 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-14 20:24:31 +0000
commitbd468840d4db56198a3d7ce4692711ddc2217771 (patch)
treebad9cc01c72537c8839159c77c2c0bf45735ae54
parent3c656346c91448f2a42b67e169a9fd4f62e4552e (diff)
fixed LF interpretation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--console.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/console.c b/console.c
index 0dfed71294..f039dfcb39 100644
--- a/console.c
+++ b/console.c
@@ -619,7 +619,6 @@ static void console_put_lf(TextConsole *s)
TextCell *c;
int x, y1;
- s->x = 0;
s->y++;
if (s->y >= s->height) {
s->y = s->height - 1;
@@ -773,6 +772,7 @@ static void console_putchar(TextConsole *s, int ch)
break;
case '\t': /* tabspace */
if (s->x + (8 - (s->x % 8)) > s->width) {
+ s->x = 0;
console_put_lf(s);
} else {
s->x = s->x + (8 - (s->x % 8));
@@ -791,8 +791,10 @@ static void console_putchar(TextConsole *s, int ch)
c->t_attrib = s->t_attrib;
update_xy(s, s->x, s->y);
s->x++;
- if (s->x >= s->width)
+ if (s->x >= s->width) {
+ s->x = 0;
console_put_lf(s);
+ }
break;
}
break;