summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorHamish Downer <hamish@foobacca.co.uk>2013-10-13 18:28:07 +0000
committerHamish Downer <hamish@foobacca.co.uk>2013-10-13 18:28:07 +0000
commit01cafd92f33b498626cc58f6fcbba7c26d35b23b (patch)
tree74712c341d72ebb03bce75eb92793ceb16292ac5 /alot
parent3df004fe0ffb07d27e9b1aa7095ca8bb9c6cdbc3 (diff)
retagprompt: skip empty tags
(and so avoid having a leading comma)
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 081611e7..ead500a6 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -103,7 +103,8 @@ class RetagPromptCommand(Command):
for tag in thread.get_tags():
if ' ' in tag:
tags.append('"%s"' % tag)
- else:
+ # skip empty tags
+ elif tag:
tags.append(tag)
initial_tagstring = ','.join(sorted(tags)) + ','
ui.apply_command(PromptCommand('retag ' + initial_tagstring))