diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-13 14:39:34 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-13 14:39:34 +0100 |
commit | a27fead926cd4960e090aeebee953e682a684bdf (patch) | |
tree | d3afc37204cecce369af1280eb4fb98208d28f6a /alot/widgets | |
parent | d3e1e66d87eccc51bbd28357572553a124ea8d0e (diff) |
widgets/thread: fix displaying empty text parts
Diffstat (limited to 'alot/widgets')
-rw-r--r-- | alot/widgets/thread.py | 6 |
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): |