basetabs: wrap coroutine commands in ensure_future
This commit is contained in:
parent
695b2ee09a
commit
93c448506a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue