summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatrick <p.totzke@ed.ac.uk>2011-08-05 16:29:34 +0100
committerpatrick <p.totzke@ed.ac.uk>2011-08-05 16:29:34 +0100
commit0b7ffdcc227ae3f2a56653395a11889d643d86bc (patch)
treedb0aaddc3dd7d401c60acf5367e05d0ec8130d92
parent2d5f53b16559cb21a0caa77637faee54bae87937 (diff)
toggletag on empty threadlist should pass
-rw-r--r--alot/command.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/alot/command.py b/alot/command.py
index e407d773..10a486cd 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -303,6 +303,8 @@ class ToggleThreadTagCommand(Command):
def apply(self, ui):
if not self.thread:
self.thread = ui.current_buffer.get_selected_thread()
+ if not self.thread:
+ return
try:
if self.tag in self.thread.get_tags():
self.thread.remove_tags([self.tag])