diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-10-06 11:24:44 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-10-06 11:24:44 +0100 |
commit | f2d65413f5e9fdb56831c633aff70b1ea552b46a (patch) | |
tree | 02353391c9eb8e4b5ef7fb85c47d4ff9d40e6ac3 /alot/commands/search.py | |
parent | 844cec876f21369b8bdcda7911289746e4056b0f (diff) |
re-enable toggletags command in search mode
... which has been accidentally removed before
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r-- | alot/commands/search.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py index f3dc1831..db718807 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -210,6 +210,17 @@ class TagCommand(Command): ui.dbman.tag(testquery, tags, remove_rest=True) elif self.action == 'remove': ui.dbman.untag(testquery, tags) + elif self.action == 'toggle': + if not self.allm: + to_remove = [] + to_add = [] + for t in tags: + if t in thread.get_tags(): + to_remove.append(t) + else: + to_add.append(t) + thread.remove_tags(to_remove) + thread.add_tags(to_add, afterwards=refresh) except DatabaseROError: ui.notify('index in read-only mode', priority='error') return |