summaryrefslogtreecommitdiff
path: root/src/plugin_manager.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-11 00:55:42 +0200
committermathieui <mathieui@mathieui.net>2014-04-11 00:55:42 +0200
commit0847643b548d1f5014c1af56a86c0e6c2d7ce92f (patch)
treefc6d4e22462bc70bd04680e8409369529b98a28e /src/plugin_manager.py
parentd18fe6c477332afd2a81a4723c2951c8328d0cf1 (diff)
downloadpoezio-0847643b548d1f5014c1af56a86c0e6c2d7ce92f.tar.gz
poezio-0847643b548d1f5014c1af56a86c0e6c2d7ce92f.tar.bz2
poezio-0847643b548d1f5014c1af56a86c0e6c2d7ce92f.tar.xz
poezio-0847643b548d1f5014c1af56a86c0e6c2d7ce92f.zip
Fix #2421 (load and unload several plugins)
Diffstat (limited to 'src/plugin_manager.py')
-rw-r--r--src/plugin_manager.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugin_manager.py b/src/plugin_manager.py
index 28dde603..dc6199e7 100644
--- a/src/plugin_manager.py
+++ b/src/plugin_manager.py
@@ -110,7 +110,7 @@ class PluginManager(object):
else: # 3.3 & >
loader = finder.find_module(name, load_path)
if not loader:
- self.core.information('Could not find plugin')
+ self.core.information('Could not find plugin: %s' % name)
return
module = loader.load_module()
@@ -311,13 +311,15 @@ class PluginManager(object):
plugins_files = [name[:-3] for name in names if name.endswith('.py')
and name != '__init__.py' and not name.startswith('.')]
plugins_files.sort()
- return the_input.new_completion(plugins_files, 1, '', quotify=False)
+ position = the_input.get_argument_position(quoted=False)
+ return the_input.new_completion(plugins_files, position, '', quotify=False)
def completion_unload(self, the_input):
"""
completion function that completes the name of the plugins that are loaded
"""
- return the_input.new_completion(sorted(self.plugins.keys()), 1, '', quotify=False)
+ position = the_input.get_argument_position(quoted=False)
+ return the_input.new_completion(sorted(self.plugins.keys()), position, '', quotify=False)
def on_plugins_dir_change(self, new_value):
global plugins_dir