Skip to content

Commit 8671abe

Browse files
[Improvements] Let's try a thing.
There is currently an issue where the settings are not loaded properly when the package is installed. I don't know if that is because of the `src` not loading properly. This snippet of code is taken from OverrideAudit. Let's see if this works by any chance.
1 parent 4ca9c67 commit 8671abe

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

commands_browser.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import os
2+
import sys
3+
import imp
24
import shutil
35
import sublime
46
from .src.settings import load_commands_browser_settings
@@ -8,6 +10,17 @@
810
)
911

1012

13+
def reload(prefix, modules=[""]):
14+
prefix = "CommandsBrowser.%s." % prefix
15+
16+
for module in modules:
17+
module = (prefix + module).rstrip(".")
18+
if module in sys.modules:
19+
imp.reload(sys.modules[module])
20+
21+
reload("src")
22+
23+
1124
def plugin_loaded():
1225
""" This function is called when the package is loaded, but before the API
1326
functions are made available. We need to do 2 things here.

0 commit comments

Comments
 (0)