summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Erik Baxter <web@superscript.com>2012-08-18 21:50:43 -0400
committerPatrick Totzke <patricktotzke@gmail.com>2012-09-23 14:05:02 +0100
commitad744db5666c953b17b2ddf82f28d8edcd83f560 (patch)
treec9cd480c917eca7b4a7acfe0235df7a9451ce025
parentbd48819df444dad5a7930f3f80442c1a5621dd62 (diff)
Move refresh outside of thread loop.
-rw-r--r--alot/commands/search.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 53da2e46..5583ac63 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -286,12 +286,11 @@ class TagSearchCommand(Command):
(threadline,size) = threadlist.get_next(pos)
thread = threadline.get_thread()
if self.action == 'add':
- thread.add_tags(tags, afterwards=refresh)
+ thread.add_tags(tags)
if self.action == 'set':
- thread.add_tags(tags, afterwards=refresh,
- remove_rest=True)
+ thread.add_tags(tags, remove_rest=True)
elif self.action == 'remove':
- thread.remove_tags(tags, afterwards=refresh)
+ thread.remove_tags(tags)
elif self.action == 'toggle':
to_remove = []
to_add = []
@@ -301,7 +300,7 @@ class TagSearchCommand(Command):
else:
to_add.append(t)
thread.remove_tags(to_remove)
- thread.add_tags(to_add, afterwards=refresh)
+ thread.add_tags(to_add)
pos += 1
except DatabaseROError:
ui.notify('index in read-only mode', priority='error')
@@ -311,3 +310,5 @@ class TagSearchCommand(Command):
if self.flush:
ui.apply_command(commands.globals.FlushCommand())
+ refresh()
+