From 00d41dee711a1388b1eba1d2077c90c07e6bb8c6 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 2 Jun 2012 14:30:52 +0200 Subject: [PATCH] * grub-core/normal/menu_entry.c (update_screen): Fix loop condition to fix partially stale display. --- ChangeLog | 5 +++++ grub-core/normal/menu_entry.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bbd8d4155..e48883ae2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-02 Vladimir Serbinenko + + * grub-core/normal/menu_entry.c (update_screen): Fix loop condition to + fix partially stale display. + 2012-06-02 Vladimir Serbinenko * grub-core/normal/menu_entry.c (backward_char): Use right line for diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c index f7cb78375..ac247d3a2 100644 --- a/grub-core/normal/menu_entry.c +++ b/grub-core/normal/menu_entry.c @@ -309,12 +309,16 @@ update_screen (struct screen *screen, struct per_term_screen *term_screen, { int column; int off = 0; + int full_len; if (linep >= screen->lines + screen->num_lines) break; + full_len = grub_getstringwidth (linep->buf, linep->buf + linep->len, + term_screen->term); + for (column = 0; - column <= linep->len + column <= full_len && y < term_screen->num_entries; column += grub_term_entry_width (term_screen->term), y++) {