Skip to content

Commit

Permalink
Session.open_uri_async: Focus view when open file: URI
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Oct 5, 2022
1 parent 969a9c8 commit 65fc511
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin/core/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,11 @@ def _open_file_uri_async(
def handle_continuation(view: Optional[sublime.View]) -> None:
if view and r:
center_selection(view, r)
elif view:
window = view.window()
if window:
window.focus_view(view)

sublime.set_timeout_async(lambda: result[1](view))

sublime.set_timeout(lambda: open_file(self.window, uri, flags, group).then(handle_continuation))
Expand Down

0 comments on commit 65fc511

Please sign in to comment.