diff options
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r-- | alot/commands/search.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py index 5d7a7cbd..8e959e65 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -196,7 +196,7 @@ class TagCommand(Command): ui.update() - tags = [x for x in self.tagsstring.split(',') if x] + tags = frozenset(filter(None, self.tagsstring.split(','))) try: if self.action == 'add': @@ -207,13 +207,13 @@ class TagCommand(Command): ui.dbman.untag(testquery, tags) elif self.action == 'toggle': if not self.allm: - to_remove = [] - to_add = [] + to_remove = set() + to_add = () for t in tags: if t in thread.get_tags(): - to_remove.append(t) + to_remove.add(t) else: - to_add.append(t) + to_add.add(t) thread.remove_tags(to_remove) thread.add_tags(to_add, afterwards=refresh) except DatabaseROError: |