WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] pygrub: expands tabs before displaying menus.
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Nov 2009 00:40:48 -0800
Delivery-date: Fri, 27 Nov 2009 00:41:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] pygrub: expands tabs before displaying menus., Xen patchbot-3.4-testing <=