diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2017-02-22 14:39:20 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2017-02-22 14:39:20 +0000 |
commit | 5abf264a4a2292adaa7e5fef5f6857e98f45fcbf (patch) | |
tree | 4a4299ba5da2db15b0991e2c0f21b0b72b89e70a /alot | |
parent | c2b73f139998cd465133b5942a345875486ce514 (diff) |
fix #1036
This prevents the threadbuffer to look up a nonexistent focussed message
if the thread is empty (e.g. after removal of the last msg).
Diffstat (limited to 'alot')
-rw-r--r-- | alot/buffers.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/alot/buffers.py b/alot/buffers.py index 74f4fdfa..1f25357f 100644 --- a/alot/buffers.py +++ b/alot/buffers.py @@ -376,6 +376,9 @@ class ThreadBuffer(Buffer): self.message_count = self.thread.get_total_messages() def render(self, size, focus=False): + if self.message_count == 0: + return self.body.render(size, focus) + if settings.get('auto_remove_unread'): logging.debug('Tbuffer: auto remove unread tag from msg?') msg = self.get_selected_message() |