mirror of
https://github.com/hexedtech/codemp-sublime.git
synced 2025-04-01 07:11:33 +02:00
fix whole buffer selection upon attach.
This commit is contained in:
parent
4c64797ab9
commit
f4b16f1367
2 changed files with 4 additions and 0 deletions
1
main.py
1
main.py
|
@ -181,6 +181,7 @@ class CodempClientViewEventListener(sublime_plugin.ViewEventListener):
|
||||||
if self.view == sublime.active_window().active_view():
|
if self.view == sublime.active_window().active_view():
|
||||||
logger.debug("closing active view")
|
logger.debug("closing active view")
|
||||||
safe_listener_detach(TEXT_LISTENER) # pyright: ignore
|
safe_listener_detach(TEXT_LISTENER) # pyright: ignore
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bid = buffid_from_view(self.view)
|
bid = buffid_from_view(self.view)
|
||||||
some(self.view.window()).run_command(
|
some(self.view.window()).run_command(
|
||||||
|
|
|
@ -85,6 +85,7 @@ def get_contents(view):
|
||||||
|
|
||||||
|
|
||||||
def populate_view(view, content):
|
def populate_view(view, content):
|
||||||
|
cursorpos = view.sel()[0]
|
||||||
view.run_command(
|
view.run_command(
|
||||||
"codemp_replace_text",
|
"codemp_replace_text",
|
||||||
{
|
{
|
||||||
|
@ -94,6 +95,8 @@ def populate_view(view, content):
|
||||||
"change_id": None,
|
"change_id": None,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
view.sel().clear()
|
||||||
|
view.sel().add(cursorpos)
|
||||||
|
|
||||||
|
|
||||||
def view_from_local_path(path):
|
def view_from_local_path(path):
|
||||||
|
|
Loading…
Add table
Reference in a new issue