From 88e939f5a4aa98a0cfd2fad2066349c8a374dc3c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 21 Jan 2021 13:38:58 +0100 Subject: widgets/thread: treat whitespace-only lines as empty for folding detection --- alot/widgets/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alot/widgets') diff --git a/alot/widgets/thread.py b/alot/widgets/thread.py index cc7fbbf2..fce18eac 100644 --- a/alot/widgets/thread.py +++ b/alot/widgets/thread.py @@ -354,7 +354,7 @@ class _TextPart(_MIMEPartWidget): blocks.append({ 'level' : level, 'start' : i, 'end' : i, 'data_empty' : True}) blocks[-1]['end'] += 1 - if len(remainder) > 0: + if blocks[-1]['data_empty'] and len(remainder.strip()) > 0: blocks[-1]['data_empty'] = False # second pass: every quoted block where the remainder (line minus the -- cgit v1.2.3