summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/widgets/thread.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py
index 6c5d71fe..3be17976 100644
--- a/alot/widgets/thread.py
+++ b/alot/widgets/thread.py
@@ -308,9 +308,11 @@ class _TextPart(_MIMEPartWidget):
val = max(1, min(self._max_level + 1, val))
logging.info('settting foldlevel to %d', val)
- text = self._fold.fold(self._lines, val,
+ markup_lines = self._fold.fold(self._lines, val,
self._fold_context)
- self._w = urwid.Text(text)
+ if len(markup_lines) == 0:
+ markup_lines = ['']
+ self._w = urwid.Text(markup_lines)
self._fold_level = val
class _EmptyMessageWidget(_MIMEPartWidget):