File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
- """ Pymode utils. """
1
+ """Pymode utils."""
2
2
import os .path
3
3
import sys
4
4
import threading
5
5
import warnings
6
6
from contextlib import contextmanager
7
7
8
- import vim # noqa
8
+ import vim # noqa
9
9
from ._compat import StringIO
10
10
11
11
16
16
17
17
@contextmanager
18
18
def silence_stderr ():
19
- """ Redirect stderr. """
19
+ """Redirect stderr."""
20
20
if DEBUG :
21
21
yield
22
22
@@ -36,4 +36,13 @@ def patch_paths():
36
36
37
37
Load required modules from the plugin's sources.
38
38
"""
39
- sys .path .insert (0 , os .path .join (os .path .dirname (__file__ ), 'libs' ))
39
+ dir_script = os .path .dirname (os .path .abspath (__file__ ))
40
+ sys .path .insert (0 , os .path .join (dir_script , 'libs' ))
41
+ if sys .platform == 'win32' :
42
+ dir_submodule = os .path .abspath (os .path .join (dir_script ,
43
+ '..' , 'submodules' ))
44
+ sub_modules = os .listdir (dir_submodule )
45
+ for module in sub_modules :
46
+ module_full_path = os .path .join (dir_submodule , module )
47
+ if module_full_path not in sys .path :
48
+ sys .path .insert (0 , module_full_path )
You can’t perform that action at this time.
0 commit comments