summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 344cf35e..af5576cb 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -1058,16 +1058,14 @@ class TagCommand(Command):
Command.__init__(self, **kwargs)
async def apply(self, ui):
- tbuffer = ui.current_buffer
if self.all:
- msg_wgts = list(tbuffer.message_widgets())
+ messages = ui.current_buffer.thread.messages.values()
else:
- msg_wgts = [tbuffer.get_selected_message_widget()]
+ messages = [ui.current_buffer.get_selected_message()]
tags = [t for t in self.tagsstring.split(',') if t]
try:
- for mt in msg_wgts:
- m = mt.get_message()
+ for m in messages:
if self.action == 'add':
m.add_tags(tags)
if self.action == 'set':