mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 00:29: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
+16
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user