diff --git a/ChangeLog b/ChangeLog index 29e774b09..8be744673 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-08-28 OKUJI Yoshinori + + * grub/asmstub.c (console_putchar) [HAVE_LIBCURSES]: If + USE_CURSES is true, emulate a new line like a ordinary terminal, + because ncurses treats it badly. If current position on y-axis + is the bottom of the screen, call scroll. Otherwise, call move + with the arguments, Y + 1 and X, where X and Y are current + position of the cursor. + 2000-08-28 OKUJI Yoshinori * stage2/asm.S (console_putchar): Don't print a carriage return diff --git a/grub/asmstub.c b/grub/asmstub.c index 0a42aa06a..01d63b602 100644 --- a/grub/asmstub.c +++ b/grub/asmstub.c @@ -499,7 +499,22 @@ console_putchar (int c) { #ifdef HAVE_LIBCURSES if (use_curses) - addch (c); + { + /* In ncurses, a newline is treated badly, so we emulate it in our + own way. */ + if (c == '\n') + { + int x, y; + + getyx (stdscr, y, x); + if (y + 1 == LINES) + scroll (stdscr); + else + move (y + 1, x); + } + else + addch (c); + } else #endif putchar (c);