* 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:
parent
21026747df
commit
a321606813
2 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-04-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/normal/term.c: Few more fixes for menu entry editor
|
||||||
|
rendering.
|
||||||
|
Reported by: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
|
||||||
2013-04-06 Andrey Borzenkov <arvidjaar@gmail.com>
|
2013-04-06 Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
|
||||||
* conf/Makefile.extra-dist (EXTRA_DIST): Add
|
* conf/Makefile.extra-dist (EXTRA_DIST): Add
|
||||||
|
|
|
@ -746,10 +746,13 @@ print_ucs4_terminal (const grub_uint32_t * str,
|
||||||
putcode_real (*ptr2, term, fixed_tab);
|
putcode_real (*ptr2, term, fixed_tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (contchar)
|
||||||
|
{
|
||||||
sp = max_width - pos[last_position - str].x + 1;
|
sp = max_width - pos[last_position - str].x + 1;
|
||||||
if (sp > 0)
|
if (sp > 0)
|
||||||
grub_print_spaces (term, sp);
|
grub_print_spaces (term, sp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return dry_run ? lines : 0;
|
return dry_run ? lines : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +783,8 @@ put_glyphs_terminal (const struct grub_unicode_glyph *visual,
|
||||||
grub_ssize_t visual_len,
|
grub_ssize_t visual_len,
|
||||||
int margin_left, int margin_right,
|
int margin_left, int margin_right,
|
||||||
struct grub_term_output *term,
|
struct grub_term_output *term,
|
||||||
struct term_state *state, int fixed_tab)
|
struct term_state *state, int fixed_tab,
|
||||||
|
grub_uint32_t contchar)
|
||||||
{
|
{
|
||||||
const struct grub_unicode_glyph *visual_ptr;
|
const struct grub_unicode_glyph *visual_ptr;
|
||||||
for (visual_ptr = visual; visual_ptr < visual + visual_len; visual_ptr++)
|
for (visual_ptr = visual; visual_ptr < visual + visual_len; visual_ptr++)
|
||||||
|
@ -799,7 +803,11 @@ put_glyphs_terminal (const struct grub_unicode_glyph *visual,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!contchar)
|
||||||
grub_print_spaces (term, margin_left);
|
grub_print_spaces (term, margin_left);
|
||||||
|
else
|
||||||
|
grub_term_gotoxy (term, margin_left,
|
||||||
|
grub_term_getxy (term) & 0xff);
|
||||||
}
|
}
|
||||||
grub_free (visual_ptr->combining);
|
grub_free (visual_ptr->combining);
|
||||||
}
|
}
|
||||||
|
@ -839,7 +847,7 @@ print_backlog (struct grub_term_output *term,
|
||||||
ret = put_glyphs_terminal (state->backlog_glyphs,
|
ret = put_glyphs_terminal (state->backlog_glyphs,
|
||||||
state->backlog_len,
|
state->backlog_len,
|
||||||
margin_left, margin_right, term, state,
|
margin_left, margin_right, term, state,
|
||||||
state->backlog_fixed_tab);
|
state->backlog_fixed_tab, 0);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
grub_free (state->free);
|
grub_free (state->free);
|
||||||
|
@ -942,8 +950,8 @@ print_ucs4_real (const grub_uint32_t * str,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = put_glyphs_terminal (visual_show, visual_len_show, margin_left,
|
ret = put_glyphs_terminal (visual_show, visual_len_show, margin_left,
|
||||||
contchar ? margin_right : 1,
|
contchar ? 0 : margin_right,
|
||||||
term, state, fixed_tab);
|
term, state, fixed_tab, contchar);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
grub_free (visual);
|
grub_free (visual);
|
||||||
|
|
Loading…
Reference in a new issue