summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/tabs/basetabs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 5e9ba498..8f746eab 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -324,7 +324,10 @@ class Tab:
if func:
if hasattr(self.input, "reset_completion"):
self.input.reset_completion()
- func(arg)
+ if asyncio.iscoroutinefunction(func):
+ asyncio.ensure_future(func(arg))
+ else:
+ func(arg)
return True
else:
return False