aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub/src
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-11-23 07:17:32 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-11-23 07:17:32 +0000
commit995380cd80da7a5385e06d2ff0798b48cff64c15 (patch)
tree01bf6ffd44965c977e38b38e7d78e15ecc6440a7 /tools/pygrub/src
parent758a4a6431c1de09bb52ce378e217dcce7b5f64d (diff)
downloadxen-995380cd80da7a5385e06d2ff0798b48cff64c15.tar.gz
xen-995380cd80da7a5385e06d2ff0798b48cff64c15.tar.bz2
xen-995380cd80da7a5385e06d2ff0798b48cff64c15.zip
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>
Diffstat (limited to 'tools/pygrub/src')
-rw-r--r--tools/pygrub/src/pygrub4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 84603e9c93..1ed2606324 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -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] + ">"