randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.37k stars 83 forks source link

Fix RuntimeError raised on ST4170+ #412

Closed deathaxe closed 4 months ago

deathaxe commented 4 months ago

Package Control's events module uses sublime.Settings() to provide cross-python-version events. Using events at import time therefore raises a RuntimeError as of ST4170 upon ST start as this API is not yet ready then.

This commit therefore removes Package Control dependency.

Instead all modules are removed from sys.module cache to force reloading each time main.py is reloaded. This strategy is used by various plugins with success.

randy3k commented 4 months ago

Thank you. I was also looking into the cause.

gobijan commented 4 months ago

You guys are amazing <3