refactor(lsp): replace LSPManager with controller-based architecture
- Remove legacy LSPManager dialog implementation - Introduce LSPController as the central LSP entry point - Route UI interactions through lsp_controller.lsp_manager_ui - Move client lifecycle handling out of ProviderResponseCache - Simplify completion cache and matcher filtering - Improve LSP completion item parsing with safer fallbacks - Modernize typing (Python 3.10 union syntax) - Remove unused imports and dead code - Use GLib.idle_add for safe UI scrolling operations - Minor comment and spelling fixes
This commit is contained in:
@@ -9,6 +9,7 @@ from gi.repository import GtkSource
|
||||
from gi.repository import Gtk
|
||||
from gi.repository import Gdk
|
||||
from gi.repository import Gio
|
||||
from gi.repository import GLib
|
||||
|
||||
# Application imports
|
||||
from ..command_helpers import update_info_bar_if_focused
|
||||
@@ -35,6 +36,10 @@ def execute(
|
||||
update_info_bar_if_focused(view.command, view)
|
||||
view.emit("focus-in-event", Gdk.Event())
|
||||
|
||||
buffer = view.get_buffer()
|
||||
itr = buffer.get_iter_at_mark( buffer.get_insert() )
|
||||
view.scroll_to_iter(itr, 0.2, False, 0, 0)
|
||||
def scroll_to_insert_itr(view):
|
||||
buffer = view.get_buffer()
|
||||
itr = buffer.get_iter_at_mark( buffer.get_insert() )
|
||||
view.scroll_to_iter(itr, 0.2, False, 0, 0)
|
||||
|
||||
GLib.idle_add(scroll_to_insert_itr, view)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user