From 96335baf5d0817bb8d9fe68a5dd4bbf3e4aacc75 Mon Sep 17 00:00:00 2001
From: Storm Dragon <stormdragon2976@gmail.com>
Date: Sat, 19 Apr 2025 14:48:38 -0400
Subject: [PATCH] Fixed indentation issues.

---
 src/cthulhu/script_manager.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

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):