void
grub_putcode (grub_uint32_t code, struct grub_term_output *term)
{
- int height;
-
- height = grub_term_height (term);
-
if (code == '\t' && term->getxy)
{
int n;
static grub_size_t size = 0;
static grub_uint8_t buf[6];
grub_uint32_t code;
- grub_ssize_t ret;
+ grub_size_t ret;
buf[size++] = c;
ret = grub_utf8_to_ucs4 (&code, 1, buf, size, 0);
size = 0;
FOR_ACTIVE_TERM_OUTPUTS(term)
grub_putcode (code, term);
+ if (code == '\n' && grub_newline_hook)
+ grub_newline_hook ();
}
- if (ret == '\n' && grub_newline_hook)
- grub_newline_hook ();
}
int
height = grub_term_height (cur);
grub_more_lines++;
- if (grub_more && grub_more_lines == height - 1)
+ if (grub_more && grub_more_lines >= height - 1)
{
char key;
grub_uint16_t *pos;
/* Scroll one lines or an entire page, depending on the key. */
if (key == '\r' || key =='\n')
- grub_more_lines--;
+ grub_more_lines = height - 2;
else
grub_more_lines = 0;
}