summaryrefslogtreecommitdiff
path: root/plugins/quote.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/quote.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/quote.py')
-rw-r--r--plugins/quote.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/quote.py b/plugins/quote.py
index ba7f4ea3..a5ffd193 100644
--- a/plugins/quote.py
+++ b/plugins/quote.py
@@ -44,6 +44,7 @@ Options
time of the message.
"""
+from poezio.core.structs import Completion
from poezio.plugin import BasePlugin
from poezio.xhtml import clean_text
from poezio import common
@@ -101,5 +102,5 @@ class Plugin(BasePlugin):
messages = list(filter(message_match, messages))
elif len(args) > 1:
return False
- return the_input.auto_completion([clean_text(msg.txt) for msg in messages[::-1]], '')
+ return Completion(the_input.auto_completion, [clean_text(msg.txt) for msg in messages[::-1]], '')