summaryrefslogtreecommitdiff
path: root/plugins/tell.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-08-21 15:27:53 +0200
committermathieui <mathieui@mathieui.net>2016-08-21 15:39:30 +0200
commit84e59b05ff0a17178da9ecdb6c5d084e48b42763 (patch)
tree224948d7c3d49a0005bff9390260357b3ec9c60e /plugins/tell.py
parent6c270b363ac018dfd4d66b23af95efcc35610da0 (diff)
downloadpoezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.gz
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.bz2
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.tar.xz
poezio-84e59b05ff0a17178da9ecdb6c5d084e48b42763.zip
Don’t call input completion() functions inside completion methods
Use a placeholder object that can run it afterwards, so that we don’t have side effects inside those functions.
Diffstat (limited to 'plugins/tell.py')
-rw-r--r--plugins/tell.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/tell.py b/plugins/tell.py
index 2b3eb0ce..ba638e82 100644
--- a/plugins/tell.py
+++ b/plugins/tell.py
@@ -20,6 +20,7 @@ This plugin defines two new commands for MUC tabs: :term:`/tell` and :term:`/unt
"""
from poezio.plugin import BasePlugin
+from poezio.core.structs import Completion
from poezio.decorators import command_args_parser
from poezio import tabs
@@ -77,6 +78,6 @@ class Plugin(BasePlugin):
def completion_untell(self, the_input):
tab = self.api.current_tab()
if not tab in self.tabs:
- return the_input.auto_completion([], '')
- return the_input.auto_completion(list(self.tabs[tab]), '', quotify=False)
+ return Completion(the_input.auto_completion, [], '')
+ return Completion(the_input.auto_completion, list(self.tabs[tab]), '', quotify=False)