summaryrefslogtreecommitdiff
path: root/alot/commands/namedqueries.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-07-18 09:56:53 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-07-26 10:36:16 -0700
commit781d0a824d5c08277ac73093a4846bd4f6dd2ff6 (patch)
tree1f419f7c517a42421d6ed400e4e59e7001f5dcc2 /alot/commands/namedqueries.py
parent0c8d2b2f30aaa1f6dbc7117464836c76597909ed (diff)
ui: Convert apply_command to a coroutine
This is a pretty invasive patch, since the ui code is used so extensively, it requires going into a lot of other code and converting those to coroutines, since before they returned deferred's.
Diffstat (limited to 'alot/commands/namedqueries.py')
-rw-r--r--alot/commands/namedqueries.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/namedqueries.py b/alot/commands/namedqueries.py
index 362e2bb6..f10724a8 100644
--- a/alot/commands/namedqueries.py
+++ b/alot/commands/namedqueries.py
@@ -20,11 +20,11 @@ class NamedqueriesSelectCommand(Command):
self._filt = filt
Command.__init__(self, **kwargs)
- def apply(self, ui):
+ async def apply(self, ui):
query_name = ui.current_buffer.get_selected_query()
query = ['query:"%s"' % query_name]
if self._filt:
query.extend(['and'] + self._filt)
cmd = SearchCommand(query=query)
- ui.apply_command(cmd)
+ await ui.apply_command(cmd)