From 84e59b05ff0a17178da9ecdb6c5d084e48b42763 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 21 Aug 2016 15:27:53 +0200 Subject: =?UTF-8?q?Don=E2=80=99t=20call=20input=20completion()=20functions?= =?UTF-8?q?=20inside=20completion=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a placeholder object that can run it afterwards, so that we don’t have side effects inside those functions. --- plugins/bob.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/bob.py') diff --git a/plugins/bob.py b/plugins/bob.py index b2a6441e..527692b3 100644 --- a/plugins/bob.py +++ b/plugins/bob.py @@ -22,6 +22,7 @@ Configuration options The time during which the file should stay in cache on the receiving side. """ +from poezio.core.structs import Completion from poezio.plugin import BasePlugin from poezio import tabs @@ -72,4 +73,4 @@ class Plugin(BasePlugin): mime_type = guess_type(filename)[0] if mime_type is not None and mime_type.startswith('image/'): images.append(filename) - return the_input.auto_completion(images, quotify=False) + return Completion(the_input.auto_completion, images, quotify=False) -- cgit v1.2.3