summaryrefslogtreecommitdiff
path: root/alot/widgets
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-21 13:38:58 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-21 13:39:53 +0100
commit88e939f5a4aa98a0cfd2fad2066349c8a374dc3c (patch)
treeb9377b74e3c9a0b77a62beaa6bbeb0c99624419c /alot/widgets
parent78872bfc5a4698788345397fe180eda7c09c2eeb (diff)
widgets/thread: treat whitespace-only lines as empty for folding detection
Diffstat (limited to 'alot/widgets')
-rw-r--r--alot/widgets/thread.py2
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