pygrub: expands tabs before displaying menus.

Otherwise the highlighting and line length trimming does not work as
expected and the display appears corrupted.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Keir Fraser committed 2009-11-23 07:17:32 +00:00
1 parent 758a4a6431
commit 995380cd80
1 file changed
+2 -2
+2 -2
View File
@@ -239,7 +239,7 @@ class Grub:
break
if y == self.selected_image:
self.entry_win.attron(curses.A_REVERSE)
self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.ljust(70))
self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.expandtabs().ljust(70))
if y == self.selected_image:
self.entry_win.attroff(curses.A_REVERSE)
self.entry_win.noutrefresh()
@@ -271,7 +271,7 @@ class Grub:
self.entry_win.attron(curses.A_REVERSE)
# trim the line
l = img.lines[idx].ljust(70)
l = img.lines[idx].expandtabs().ljust(70)
if len(l) > 70:
l = l[:69] + ">"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.