diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-24 09:17:15 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-24 09:17:15 +0000 |
commit | 4450b7ee2e443079816df482489186fffa8ce5dc (patch) | |
tree | c2544365f517681cd2dcadc380e69f94c73e7bb8 | |
parent | 6862f786661b48a9523468421968172e95270216 (diff) |
no tag/untag/toggletags operation on empty result
..sets in search buffers.
closes #335
-rw-r--r-- | alot/commands/search.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py index 4901b34f..072764c2 100644 --- a/alot/commands/search.py +++ b/alot/commands/search.py @@ -149,6 +149,10 @@ class TagCommand(Command): def apply(self, ui): threadline_widget = ui.current_buffer.get_selected_threadline() + # pass if the current buffer has no selected threadline + # (displays an empty search result) + if threadline_widget is None: + return thread = threadline_widget.get_thread() testquery = "(%s) AND thread:%s" % (ui.current_buffer.querystring, thread.get_thread_id()) |