summaryrefslogtreecommitdiff
path: root/alot/commands/search.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-18 17:51:28 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-18 17:51:28 +0100
commit5383496bf1ac9e2e13c9ae34daeed48983c34776 (patch)
tree13dc5937863a7b440585732d591a18d6ed721018 /alot/commands/search.py
parentcfbef97efd124980a0716de43eabafc2fc7cb913 (diff)
handling of tags containing spaces in refineprompt
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r--alot/commands/search.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 2c53347e..f25fd519 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -114,7 +114,13 @@ class RetagPromptCommand(Command):
thread = ui.current_buffer.get_selected_thread()
if not thread:
return
- initial_tagstring = ','.join(thread.get_tags())
+ tags = []
+ for tag in thread.get_tags():
+ if ' ' in tag:
+ tags.append('"%s"' % tag)
+ else:
+ tags.append(tag)
+ initial_tagstring = ','.join(tags)
ui.commandprompt('retag ' + initial_tagstring)