* grub-core/normal/term.c: Few more fixes for menu entry editor

rendering.
	Reported by: Andrey Borzenkov <arvidjaar@gmail.com>
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-08 14:35:26 +02:00
parent a321606813
commit 47043f959f
4 changed files with 26 additions and 12 deletions

View file

@ -118,6 +118,15 @@ ensure_space (struct line *linep, int extra)
return 1;
}
/* The max column number of an entry. The last "-1" is for a
continuation marker. */
static inline int
grub_term_entry_width (struct grub_term_output *term)
{
return grub_term_border_width (term) - GRUB_TERM_MARGIN * 2 - 2;
}
/* Return the number of lines occupied by this line on the screen. */
static int
get_logical_num_lines (struct line *linep, struct per_term_screen *term_screen)
@ -150,7 +159,7 @@ print_empty_line (int y, struct per_term_screen *term_screen)
GRUB_TERM_LEFT_BORDER_X + GRUB_TERM_MARGIN + 1,
y + GRUB_TERM_FIRST_ENTRY_Y);
for (i = 0; i < grub_term_entry_width (term_screen->term); i++)
for (i = 0; i < grub_term_entry_width (term_screen->term) + 1; i++)
grub_putcode (' ', term_screen->term);
}