aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/provider/script_host.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/autoload/provider/script_host.py b/runtime/autoload/provider/script_host.py
index c600cff234..9bdfc32ef0 100644
--- a/runtime/autoload/provider/script_host.py
+++ b/runtime/autoload/provider/script_host.py
@@ -212,6 +212,9 @@ def path_hook(nvim):
self.module = module
def load_module(self, fullname, path=None):
+ # Check sys.modules, required for reload (see PEP302).
+ if fullname in sys.modules:
+ return sys.modules[fullname]
return self.module
class VimPathFinder(object):