diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/ui.py | 2 | ||||
-rw-r--r-- | alot/widgets.py | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -77,7 +77,7 @@ class UI: """ raise urwid.ExitMainLoop() - def prompt(self, prefix='>', text='', completer=None): + def prompt(self, prefix='>', text=u'', completer=None): self.logger.info('open prompt') prefix_widget = PromptWidget(prefix, text, completer) diff --git a/alot/widgets.py b/alot/widgets.py index a95ad1da..bee616fc 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -129,9 +129,11 @@ class TagWidget(urwid.Text): class PromptWidget(urwid.AttrMap): - def __init__(self, prefix, text='', completer=None): + def __init__(self, prefix, text=u'', completer=None): self.completer = completer leftpart = urwid.Text(prefix, align='left') + if not isinstance(text,unicode): + text = unicode(text, errors='replace') self.editpart = urwid.Edit(edit_text=text) self.start_completion_pos = len(text) self.completion_results = None |