Skip to contentSkip to conversation

Fix stuck down arrow in menu entry editor

PATCH New Andrey Borzenkov 1 participant 1 message Feb 19, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix stuck down arrow in menu entry editor

Variable `off' was never incremented so down arrow was always printed, even when we have scrolled to the end of entry.

---
 ChangeLog                     |    5 +++++
 grub-core/normal/menu_entry.c |    3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)
ChangeLog +5 -0
index 654ebcb..349ca7d 100644
@@ -1,3 +1,8 @@
+2013-02-19  Andrey Borzenkov <[email protected]>
+
+	* grub-core/normal/menu_entry.c (update_screen): remove
+	unused variable `off' which caused scroll down arrow to be always shown.
+
 2013-02-19  Paulo Flabiano Smorigo <[email protected]>
 
 	Support Openfirmware disks with non-512B sectors.
grub-core/normal/menu_entry.c +1 -2
index 7cd67f3..fbe360c 100644
@@ -243,7 +243,6 @@ update_screen (struct screen *screen, struct per_term_screen *term_screen,
 
       do
 	{
-	  int off = 0;
 	  struct grub_term_pos **pos;
 
 	  if (linep >= screen->lines + screen->num_lines)
@@ -301,7 +300,7 @@ update_screen (struct screen *screen, struct per_term_screen *term_screen,
 	  y += get_logical_num_lines (linep, term_screen);
 	  if (y >= term_screen->num_entries)
 	    {
-	      if (off <= linep->len || i + 1 < screen->num_lines)
+	      if (i + 1 < screen->num_lines)
 		down_flag = 1;
 	    }
 
Signature · 1 line
tg: (cc35b49..) fu/stuck-down-arrow (depends on: master)