diff --git a/src/cthulhu/script_manager.py b/src/cthulhu/script_manager.py index 0f184ef..b672166 100644 --- a/src/cthulhu/script_manager.py +++ b/src/cthulhu/script_manager.py @@ -318,15 +318,14 @@ class ScriptManager: return newScript.activate() + + # Register plugin keybindings with the new active script + from . import cthulhu + plugin_manager = cthulhu.getPluginSystemManager() + if plugin_manager: + plugin_manager.register_plugin_keybindings_with_active_script() + tokens = ["SCRIPT MANAGER: Setting active script to", newScript, "reason:", reason] - self._activeScript = newScript - - # Register plugin keybindings with the new active script - from . import cthulhu - plugin_manager = cthulhu.getPluginSystemManager() - if plugin_manager: - plugin_manager.register_plugin_keybindings_with_active_script() - debug.printTokens(debug.LEVEL_INFO, tokens, True) def _getScriptForAppReplicant(self, app):