From 74b695e8f432200046fd33b835838ba465dacb8a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 16 Oct 2011 16:21:41 +0200 Subject: Fix tab rendering in MessageBodyWidget urwid renders all characters in map(chr, range(32)) as '?' except for the newline character. This makes sense since it is up to the application to interpret those characters. --- alot/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alot/widgets.py b/alot/widgets.py index 791c5419..63e591d1 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -538,8 +538,8 @@ class MessageHeaderWidget(urwid.AttrMap): class MessageBodyWidget(urwid.AttrMap): """displays printable parts of an email""" - def __init__(self, msg): - bodytxt = message.extract_body(msg) + def __init__(self, msg, tab_width = 8): + bodytxt = message.extract_body(msg).replace('\t', ' ' * tab_width) urwid.AttrMap.__init__(self, urwid.Text(bodytxt), 'message_body') -- cgit v1.2.3