From e617ef9b0a94e947133392d77a52ff53653f3c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 8 Nov 2004 19:42:42 +0000 Subject: [PATCH] line must be computed, fix the bottom of the screen "diff fortunes profile" bug. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9873 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/drivers/fb_console/fb_console.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/kernel/drivers/fb_console/fb_console.c b/src/kernel/drivers/fb_console/fb_console.c index 51cf8e07e3..c4ba54917e 100755 --- a/src/kernel/drivers/fb_console/fb_console.c +++ b/src/kernel/drivers/fb_console/fb_console.c @@ -287,6 +287,7 @@ static void tab(void) { int i = console.x; + int target_line; console.x = (console.x + TAB_SIZE) & ~TAB_MASK; if (console.x >= console.columns) { @@ -296,9 +297,10 @@ tab(void) } // We need to insert spaces, or else the whole line is going to be ignored. - for (; i < console.x; i++) - console.lines[console.first_line + console.y][i] = ' '; - + target_line = WRAP(console.first_line + console.y, console.num_lines); + for (; i < console.x; i++) { + console.lines[target_line][i] = ' '; + } // There is no need to mark the line dirty }