mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 17:49:23 +00:00
emulate a new line by the grub shell itself instead of ncurses.
This commit is contained in:
1 parent
a1fafbfb0e
commit
e8e3b99925
2 files changed
+25
-1
No files matched your search
@@ -1,3 +1,12 @@
|
|||||||
|
2000-08-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
* 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 <okuji@gnu.org>
|
2000-08-28 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* stage2/asm.S (console_putchar): Don't print a carriage return
|
* stage2/asm.S (console_putchar): Don't print a carriage return
|
||||||
|
|||||||
+16
-1
@@ -499,7 +499,22 @@ console_putchar (int c)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_LIBCURSES
|
#ifdef HAVE_LIBCURSES
|
||||||
if (use_curses)
|
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
|
else
|
||||||
#endif
|
#endif
|
||||||
putchar (c);
|
putchar (c);
|
||||||
|
|||||||
Reference in new issue
Block a user