fix whole buffer selection upon attach.

This commit is contained in:
cschen 2025-02-22 19:34:57 +01:00
parent 4c64797ab9
commit f4b16f1367
2 changed files with 4 additions and 0 deletions

View file

@ -181,6 +181,7 @@ class CodempClientViewEventListener(sublime_plugin.ViewEventListener):
if self.view == sublime.active_window().active_view():
logger.debug("closing active view")
safe_listener_detach(TEXT_LISTENER) # pyright: ignore
try:
bid = buffid_from_view(self.view)
some(self.view.window()).run_command(

View file

@ -85,6 +85,7 @@ def get_contents(view):
def populate_view(view, content):
cursorpos = view.sel()[0]
view.run_command(
"codemp_replace_text",
{
@ -94,6 +95,8 @@ def populate_view(view, content):
"change_id": None,
},
)
view.sel().clear()
view.sel().add(cursorpos)
def view_from_local_path(path):