diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-01-21 13:38:58 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-21 13:39:53 +0100 |
commit | 88e939f5a4aa98a0cfd2fad2066349c8a374dc3c (patch) | |
tree | b9377b74e3c9a0b77a62beaa6bbeb0c99624419c | |
parent | 78872bfc5a4698788345397fe180eda7c09c2eeb (diff) |
widgets/thread: treat whitespace-only lines as empty for folding detection
-rw-r--r-- | alot/widgets/thread.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |