From 31f2c28c069f3ef9a1fd2fcc495c16028b582887 Mon Sep 17 00:00:00 2001 From: Pavol Babincak Date: Sat, 6 May 2006 18:10:37 +0200 Subject: [PATCH] Correction of b0e2840f0d. Do not correct main menu when utf-8 is not used. --- src/bfu/menu.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/bfu/menu.c b/src/bfu/menu.c index ad64712d3..237209556 100644 --- a/src/bfu/menu.c +++ b/src/bfu/menu.c @@ -1093,17 +1093,21 @@ display_mainmenu(struct terminal *term, struct menu *menu) menu->last = i - 1; int_lower_bound(&menu->last, menu->first); if (menu->last < menu->size - 1) { - struct screen_char *schar; +#ifdef CONFIG_UTF_8 + if (term->utf8) { + struct screen_char *schar; - schar = get_char(term, term->width - R_MAINMENU_SPACE, 0); - /* Is second cell of double-width char on the place where - * first char of the R_MAINMENU_SPACE will be displayed? */ - if (schar->data == UCS_NO_CHAR) { - /* Replace double-width char with ' '. */ - schar++; - draw_char_data(term, term->width - R_MAINMENU_SPACE - 1, - 0, ' '); + schar = get_char(term, term->width - R_MAINMENU_SPACE, 0); + /* Is second cell of double-width char on the place where + * first char of the R_MAINMENU_SPACE will be displayed? */ + if (schar->data == UCS_NO_CHAR) { + /* Replace double-width char with ' '. */ + schar++; + draw_char_data(term, term->width - R_MAINMENU_SPACE - 1, + 0, ' '); + } } +#endif set_box(&box, term->width - R_MAINMENU_SPACE, 0,