We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6908198 commit a93c1a5Copy full SHA for a93c1a5
neovim/plugins/script_host.py
@@ -2,7 +2,7 @@
2
import logging
3
import sys
4
5
-from ..api.common import SessionHook
+from ..api.common import SessionHook, DecodeHook
6
from ..compat import NUM_TYPES, IS_PYTHON3
7
8
@@ -26,6 +26,8 @@ def __init__(self, nvim):
26
# it seems some plugins assume 'sys' is already imported, so do it now
27
exec('import sys', self.module.__dict__)
28
sys.modules['vim'] = nvim.with_hook(LegacyEvalHook())
29
+ if IS_PYTHON3:
30
+ sys.modules['vim'] = sys.modules['vim'].with_hook(DecodeHook(encoding=nvim.options['encoding'].decode('ascii')))
31
32
def python_execute(self, script):
33
exec(script, self.module.__dict__)
0 commit comments