Files
Python-With-Gtk-Template/plugins/code/ui/code_minimap/plugin.py
itdominator 0dc21cbb82 refactor: remove split_pane_manager plugin and harden view handling
- Delete deprecated split_pane_manager command plugin and all related commands
- Introduce new split_pane command structure (untracked replacement)
- Add guard in code_minimap to handle missing active view
- Prevent language detection for non-file buffers in command_helpers

This cleans up legacy split pane logic and improves stability for edge cases.
2026-04-04 23:21:03 -05:00

41 lines
938 B
Python

# Python imports
# Lib imports
# Application imports
from libs.event_factory import Event_Factory, Code_Event_Types
from plugins.plugin_types import PluginCode
from .code_minimap import CodeMiniMap
code_minimap = CodeMiniMap()
class Plugin(PluginCode):
def __init__(self):
super(Plugin, self).__init__()
def _controller_message(self, event: Code_Event_Types.CodeEvent):
if isinstance(event, Code_Event_Types.FocusedViewEvent):
code_minimap.set_smini_view(event.view)
def load(self):
editors_container = self.request_ui_element("editors-container")
editors_container.add( code_minimap )
event = Event_Factory.create_event("get_active_view")
self.emit_to("source_views", event)
if not event.response: return
code_minimap.set_smini_view(event.response)
def unload(self):
code_minimap.destroy()
def run(self):
...