From 4eb43908cced243628abb27ea218708d76c81d30 Mon Sep 17 00:00:00 2001 From: Rafal Chlodnicki Date: Wed, 2 Oct 2024 21:11:04 +0200 Subject: [PATCH] style change --- plugin/core/windows.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/plugin/core/windows.py b/plugin/core/windows.py index 728dda9b5..27cd45786 100644 --- a/plugin/core/windows.py +++ b/plugin/core/windows.py @@ -525,19 +525,6 @@ def __init__(self) -> None: self._windows: dict[int, WindowManager] = {} client_configs.set_listener(self) - def on_client_config_updated(self, config_name: str | None = None) -> None: - for wm in self._windows.values(): - wm.get_config_manager().update(config_name) - - def on_userprefs_updated(self) -> None: - sublime.set_timeout_async(self._on_userprefs_updated_async) - - def _on_userprefs_updated_async(self) -> None: - for wm in self._windows.values(): - wm.on_diagnostics_updated() - for session in wm.get_sessions(): - session.on_userprefs_changed_async() - def enable(self) -> None: self._enabled = True # Initialize manually at plugin_loaded as we'll miss out on "on_new_window_async" events. @@ -576,6 +563,21 @@ def discard(self, window: sublime.Window) -> None: if wm: sublime.set_timeout_async(wm.destroy) + def _on_userprefs_updated_async(self) -> None: + for wm in self._windows.values(): + wm.on_diagnostics_updated() + for session in wm.get_sessions(): + session.on_userprefs_changed_async() + + # --- Implements LspSettingsChangeListener ------------------------------------------------------------------------- + + def on_client_config_updated(self, config_name: str | None = None) -> None: + for wm in self._windows.values(): + wm.get_config_manager().update(config_name) + + def on_userprefs_updated(self) -> None: + sublime.set_timeout_async(self._on_userprefs_updated_async) + class RequestTimeTracker: def __init__(self) -> None: