[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.4-testing] pygrub: expands tabs before displaying menus.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259310469 0
# Node ID a5d8227c81338e27fd708ff861b1f46dbcdf11b9
# Parent  6b5a769575c36add9e04e06484796fa46e28b155
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@xxxxxxxxxx>
xen-unstable changeset:   20481:8f4e0adc2b3b
xen-unstable date:        Mon Nov 23 07:17:32 2009 +0000
---
 tools/pygrub/src/pygrub |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 6b5a769575c3 -r a5d8227c8133 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Fri Nov 27 08:27:22 2009 +0000
+++ b/tools/pygrub/src/pygrub   Fri Nov 27 08:27:49 2009 +0000
@@ -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] + ">"
                     

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.