diff options
Diffstat (limited to 'tools/pygrub/src/pygrub')
-rw-r--r-- | tools/pygrub/src/pygrub | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 71dd086953..b4b2e1023a 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -259,13 +259,13 @@ class Grub: self.text_win.move(y - 1, x - 1) self.text_win.noutrefresh() - curline = 1 + curline = 0 img = copy.deepcopy(origimg) while 1: draw() self.entry_win.erase() self.entry_win.box() - for idx in range(1, len(img.lines)): + for idx in range(0, len(img.lines)): # current line should be highlighted if idx == curline: self.entry_win.attron(curses.A_REVERSE) @@ -275,7 +275,7 @@ class Grub: if len(l) > 70: l = l[:69] + ">" - self.entry_win.addstr(idx, 2, l) + self.entry_win.addstr(idx + 1, 2, l) if idx == curline: self.entry_win.attroff(curses.A_REVERSE) self.entry_win.noutrefresh() @@ -308,8 +308,8 @@ class Grub: return # bound at the top and bottom - if curline < 1: - curline = 1 + if curline < 0: + curline = 0 elif curline >= len(img.lines): curline = len(img.lines) - 1 |