summaryrefslogtreecommitdiff
path: root/alot/commands/envelope.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-11-20 13:32:44 +0100
committerAnton Khirnov <anton@khirnov.net>2021-11-20 14:54:11 +0100
commitd64e41150f6ba53a9361e8560d374bc69974ca84 (patch)
treeda10addbc7dcb4a7adcd64c92f6ba5e7b668eb23 /alot/commands/envelope.py
parent69d88aa3c882cfc28ff6f4f2e558e8058d331884 (diff)
mail/envelope: add a special class for headers
Handle multiple headers with ordering and case-insensitive operations.
Diffstat (limited to 'alot/commands/envelope.py')
-rw-r--r--alot/commands/envelope.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 4b485425..5dce6b44 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -369,9 +369,9 @@ class EditCommand(Command):
headertext = ''
for key in edit_headers:
vlist = self.envelope.get_all(key)
- if not vlist:
+ if len(vlist) == 0:
# ensure editable headers are present in template
- vlist = ['']
+ vlist.append('')
else:
# remove to be edited lines from envelope
del self.envelope[key]