Commit 93c44850 authored by mathieui's avatar mathieui Committed by Link Mauve

basetabs: wrap coroutine commands in ensure_future

parent 695b2ee0
...@@ -324,7 +324,10 @@ class Tab: ...@@ -324,7 +324,10 @@ class Tab:
if func: if func:
if hasattr(self.input, "reset_completion"): if hasattr(self.input, "reset_completion"):
self.input.reset_completion() self.input.reset_completion()
func(arg) if asyncio.iscoroutinefunction(func):
return True return True
else: else:
return False return False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment