Fix tab and wide character handling in editor and menu.
* grub-core/normal/charset.c (grub_unicode_aglomerate_comb): Don't agglomerate control characters with combining marks. (bidi_line_wrap): Allow break on tab. (grub_unicode_get_comb_start): New function. * grub-core/normal/menu_entry.c: Restructure to handle wide characters and tab correctly. * grub-core/normal/menu_text.c (print_entry): Replace \n, \r, \b and \e with a space. * grub-core/normal/term.c (print_ucs4_terminal): New argument fixed_tab_size. All users updated. * include/grub/term.h (GRUB_TERM_TAB_WIDTH): New const. (grub_term_getcharwidth): Handle \t. * include/grub/unicode.h (grub_unicode_glyph_dup): Fix allocation and copy.
This commit is contained in:
parent
22e6a774f9
commit
e1bd676b4e
9 changed files with 320 additions and 189 deletions
|
@ -50,7 +50,8 @@ grub_putcode_dumb (grub_uint32_t code,
|
|||
{
|
||||
int n;
|
||||
|
||||
n = 8 - ((term->getxy (term) >> 8) & 7);
|
||||
n = GRUB_TERM_TAB_WIDTH - ((term->getxy (term) >> 8)
|
||||
% GRUB_TERM_TAB_WIDTH);
|
||||
while (n--)
|
||||
grub_putcode_dumb (' ', term);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue