We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The Go To on a cloned view is enabled on the first view, instead of the current one
Copied from: https://github.com/SublimeTextIssues/Core/issues/1482 (The Go To on a cloned view is enabled on the first view, instead of the current one)

```patch
diff --git a/plugin/definition.py b/plugin/definition.py
index 7e77681..a84899c 100644
--- a/plugin/definition.py
+++ b/plugin/definition.py
@@ -42,12 +42,17 @@ class LspSymbolDefinitionCommand(LspTextCommand):
             # save to jump back history
             get_jump_history_for_view(self.view).push_selection(self.view)
 
+            # https://github.com/SublimeTextIssues/Core/issues/1482
+            group, view_index = window.get_view_index(self.view)
+            window.set_view_index(self.view, group, 0)
+
             location = response if isinstance(response, dict) else response[0]
             file_path = uri_to_filename(location.get("uri"))
             start = Point.from_lsp(location['range']['start'])
             file_location = "{}:{}:{}".format(file_path, start.row + 1, start.col + 1)
             log(2, "opening location %s <%s>", location, file_location)
             window.open_file(file_location, sublime.ENCODED_POSITION)
+            window.set_view_index(self.view, group, view_index)
             # TODO: can add region here.
         else:
             window.run_command("goto_definition")
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `plugin/core/open.py`
Content:
```
1 from .logging import exception_log
2 from .promise import Promise
3 from .promise import ResolveFunc
4 from .protocol import DocumentUri
5 from .protocol import Range
6 from .protocol import UINT_MAX
7 from .typing import Dict, Tuple, Optional
8 from .typing import cast
9 from .url import parse_uri
10 from .views import range_to_region
11 from urllib.parse import unquote, urlparse
12 import os
13 import re
14 import sublime
15 import sublime_plugin
16 import subprocess
17 import webbrowser
18 
19 
20 opening_files = {}  # type: Dict[str, Tuple[Promise[Optional[sublime.View]], ResolveFunc[Optional[sublime.View]]]]
21 FRAGMENT_PATTERN = re.compile(r'^L?(\d+)(?:,(\d+))?(?:-L?(\d+)(?:,(\d+))?)?')
22 
23 
24 def lsp_range_from_uri_fragment(fragment: str) -> Optional[Range]:
25     match = FRAGMENT_PATTERN.match(fragment)
26     if match:
27         selection = {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0}}  # type: Range
28         # Line and column numbers in the fragment are assumed to be 1-based and need to be converted to 0-based
29         # numbers for the LSP Position structure.
30         start_line, start_column, end_line, end_column = [max(0, int(g) - 1) if g else None for g in match.groups()]
31         if start_line:
32             selection['start']['line'] = start_line
33             selection['end']['line'] = start_line
34         if start_column:
35             selection['start']['character'] = start_column
36             selection['end']['character'] = start_column
37         if end_line:
38             selection['end']['line'] = end_line
39             selection['end']['character'] = UINT_MAX
40         if end_column is not None:
41             selection['end']['character'] = end_column
42         return selection
43     return None
44 
45 
46 def open_file_uri(
47     window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1
48 ) -> Promise[Optional[sublime.View]]:
49 
50     decoded_uri = unquote(uri)  # decode percent-encoded characters
51     parsed = urlparse(decoded_uri)
52     open_promise = open_file(window, decoded_uri, flags, group)
53     if parsed.fragment:
54         selection = lsp_range_from_uri_fragment(parsed.fragment)
55         if selection:
56             return open_promise.then(lambda view: _select_and_center(view, cast(Range, selection)))
57     return open_promise
58 
59 
60 def _select_and_center(view: Optional[sublime.View], r: Range) -> Optional[sublime.View]:
61     if view:
62         return center_selection(view, r)
63     return None
64 
65 
66 def _return_existing_view(flags: int, existing_view_group: int, active_group: int, specified_group: int) -> bool:
67     if specified_group > -1:
68         return existing_view_group == specified_group
69     if bool(flags & (sublime.ADD_TO_SELECTION | sublime.REPLACE_MRU)):
70         return False
71     if existing_view_group == active_group:
72         return True
73     return not bool(flags & sublime.FORCE_GROUP)
74 
75 
76 def open_file(
77     window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1
78 ) -> Promise[Optional[sublime.View]]:
79     """
80     Open a file asynchronously.
81     It is only safe to call this function from the UI thread.
82     The provided uri MUST be a file URI
83     """
84     file = parse_uri(uri)[1]
85     # window.open_file brings the file to focus if it's already opened, which we don't want (unless it's supposed
86     # to open as a separate view).
87     view = window.find_open_file(file)
88     if view and _return_existing_view(flags, window.get_view_index(view)[0], window.active_group(), group):
89         return Promise.resolve(view)
90 
91     was_already_open = view is not None
92     view = window.open_file(file, flags, group)
93     if not view.is_loading():
94         if was_already_open and (flags & sublime.SEMI_TRANSIENT):
95             # workaround bug https://github.com/sublimehq/sublime_text/issues/2411 where transient view might not get
96             # its view listeners initialized.
97             sublime_plugin.check_view_event_listeners(view)  # type: ignore
98         # It's already loaded. Possibly already open in a tab.
99         return Promise.resolve(view)
100 
101     # Is the view opening right now? Then return the associated unresolved promise
102     for fn, value in opening_files.items():
103         if fn == file or os.path.samefile(fn, file):
104             # Return the unresolved promise. A future on_load event will resolve the promise.
105             return value[0]
106 
107     # Prepare a new promise to be resolved by a future on_load event (see the event listener in main.py)
108     def fullfill(resolve: ResolveFunc[Optional[sublime.View]]) -> None:
109         global opening_files
110         # Save the promise in the first element of the tuple -- except we cannot yet do that here
111         opening_files[file] = (None, resolve)  # type: ignore
112 
113     promise = Promise(fullfill)
114     tup = opening_files[file]
115     # Save the promise in the first element of the tuple so that the for-loop above can return it
116     opening_files[file] = (promise, tup[1])
117     return promise
118 
119 
120 def center_selection(v: sublime.View, r: Range) -> sublime.View:
121     selection = range_to_region(r, v)
122     v.run_command("lsp_selection_set", {"regions": [(selection.a, selection.a)]})
123     window = v.window()
124     if window:
125         window.focus_view(v)
126     if int(sublime.version()) >= 4124:
127         v.show_at_center(selection.begin(), animate=False)
128     else:
129         # TODO: remove later when a stable build lands
130         v.show_at_center(selection.begin())  # type: ignore
131     return v
132 
133 
134 def open_in_browser(uri: str) -> None:
135     # NOTE: Remove this check when on py3.8.
136     if not uri.lower().startswith(("http://", "https://")):
137         uri = "https://" + uri
138     if not webbrowser.open(uri):
139         sublime.status_message("failed to open: " + uri)
140 
141 
142 def open_externally(uri: str, take_focus: bool) -> bool:
143     """
144     A blocking function that invokes the OS's "open with default extension"
145     """
146     try:
147         # TODO: handle take_focus
148         if sublime.platform() == "windows":
149             os.startfile(uri)  # type: ignore
150         elif sublime.platform() == "osx":
151             subprocess.check_call(("/usr/bin/open", uri))
152         else:  # linux
153             subprocess.check_call(("xdg-open", uri))
154         return True
155     except Exception as ex:
156         exception_log("Failed to open {}".format(uri), ex)
157         return False
158
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/plugin/core/open.py b/plugin/core/open.py
--- a/plugin/core/open.py
+++ b/plugin/core/open.py
@@ -73,6 +73,15 @@
     return not bool(flags & sublime.FORCE_GROUP)
 
 
+def _find_open_file(window: sublime.Window, fname: str, group: int = -1) -> Optional[sublime.View]:
+    """A replacement for Window.find_open_file that prefers the active view instead of the leftmost one."""
+    _group = window.active_group() if group == -1 else group
+    view = window.active_view_in_group(_group)
+    if fname == view.file_name():
+        return view
+    return window.find_open_file(fname, group)
+
+
 def open_file(
     window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1
 ) -> Promise[Optional[sublime.View]]:
@@ -84,7 +93,7 @@
     file = parse_uri(uri)[1]
     # window.open_file brings the file to focus if it's already opened, which we don't want (unless it's supposed
     # to open as a separate view).
-    view = window.find_open_file(file)
+    view = _find_open_file(window, file)
     if view and _return_existing_view(flags, window.get_view_index(view)[0], window.active_group(), group):
         return Promise.resolve(view)

{"golden_diff": "diff --git a/plugin/core/open.py b/plugin/core/open.py\n--- a/plugin/core/open.py\n+++ b/plugin/core/open.py\n@@ -73,6 +73,15 @@\n     return not bool(flags & sublime.FORCE_GROUP)\n \n \n+def _find_open_file(window: sublime.Window, fname: str, group: int = -1) -> Optional[sublime.View]:\n+    \"\"\"A replacement for Window.find_open_file that prefers the active view instead of the leftmost one.\"\"\"\n+    _group = window.active_group() if group == -1 else group\n+    view = window.active_view_in_group(_group)\n+    if fname == view.file_name():\n+        return view\n+    return window.find_open_file(fname, group)\n+\n+\n def open_file(\n     window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1\n ) -> Promise[Optional[sublime.View]]:\n@@ -84,7 +93,7 @@\n     file = parse_uri(uri)[1]\n     # window.open_file brings the file to focus if it's already opened, which we don't want (unless it's supposed\n     # to open as a separate view).\n-    view = window.find_open_file(file)\n+    view = _find_open_file(window, file)\n     if view and _return_existing_view(flags, window.get_view_index(view)[0], window.active_group(), group):\n         return Promise.resolve(view)\n", "issue": "The Go To on a cloned view is enabled on the first view, instead of the current one\nCopied from: https://github.com/SublimeTextIssues/Core/issues/1482 (The Go To on a cloned view is enabled on the first view, instead of the current one)\r\n\r\n```patch\r\ndiff --git a/plugin/definition.py b/plugin/definition.py\r\nindex 7e77681..a84899c 100644\r\n--- a/plugin/definition.py\r\n+++ b/plugin/definition.py\r\n@@ -42,12 +42,17 @@ class LspSymbolDefinitionCommand(LspTextCommand):\r\n             # save to jump back history\r\n             get_jump_history_for_view(self.view).push_selection(self.view)\r\n \r\n+            # https://github.com/SublimeTextIssues/Core/issues/1482\r\n+            group, view_index = window.get_view_index(self.view)\r\n+            window.set_view_index(self.view, group, 0)\r\n+\r\n             location = response if isinstance(response, dict) else response[0]\r\n             file_path = uri_to_filename(location.get(\"uri\"))\r\n             start = Point.from_lsp(location['range']['start'])\r\n             file_location = \"{}:{}:{}\".format(file_path, start.row + 1, start.col + 1)\r\n             log(2, \"opening location %s <%s>\", location, file_location)\r\n             window.open_file(file_location, sublime.ENCODED_POSITION)\r\n+            window.set_view_index(self.view, group, view_index)\r\n             # TODO: can add region here.\r\n         else:\r\n             window.run_command(\"goto_definition\")\r\n```\n", "before_files": [{"content": "from .logging import exception_log\nfrom .promise import Promise\nfrom .promise import ResolveFunc\nfrom .protocol import DocumentUri\nfrom .protocol import Range\nfrom .protocol import UINT_MAX\nfrom .typing import Dict, Tuple, Optional\nfrom .typing import cast\nfrom .url import parse_uri\nfrom .views import range_to_region\nfrom urllib.parse import unquote, urlparse\nimport os\nimport re\nimport sublime\nimport sublime_plugin\nimport subprocess\nimport webbrowser\n\n\nopening_files = {}  # type: Dict[str, Tuple[Promise[Optional[sublime.View]], ResolveFunc[Optional[sublime.View]]]]\nFRAGMENT_PATTERN = re.compile(r'^L?(\\d+)(?:,(\\d+))?(?:-L?(\\d+)(?:,(\\d+))?)?')\n\n\ndef lsp_range_from_uri_fragment(fragment: str) -> Optional[Range]:\n    match = FRAGMENT_PATTERN.match(fragment)\n    if match:\n        selection = {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0}}  # type: Range\n        # Line and column numbers in the fragment are assumed to be 1-based and need to be converted to 0-based\n        # numbers for the LSP Position structure.\n        start_line, start_column, end_line, end_column = [max(0, int(g) - 1) if g else None for g in match.groups()]\n        if start_line:\n            selection['start']['line'] = start_line\n            selection['end']['line'] = start_line\n        if start_column:\n            selection['start']['character'] = start_column\n            selection['end']['character'] = start_column\n        if end_line:\n            selection['end']['line'] = end_line\n            selection['end']['character'] = UINT_MAX\n        if end_column is not None:\n            selection['end']['character'] = end_column\n        return selection\n    return None\n\n\ndef open_file_uri(\n    window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1\n) -> Promise[Optional[sublime.View]]:\n\n    decoded_uri = unquote(uri)  # decode percent-encoded characters\n    parsed = urlparse(decoded_uri)\n    open_promise = open_file(window, decoded_uri, flags, group)\n    if parsed.fragment:\n        selection = lsp_range_from_uri_fragment(parsed.fragment)\n        if selection:\n            return open_promise.then(lambda view: _select_and_center(view, cast(Range, selection)))\n    return open_promise\n\n\ndef _select_and_center(view: Optional[sublime.View], r: Range) -> Optional[sublime.View]:\n    if view:\n        return center_selection(view, r)\n    return None\n\n\ndef _return_existing_view(flags: int, existing_view_group: int, active_group: int, specified_group: int) -> bool:\n    if specified_group > -1:\n        return existing_view_group == specified_group\n    if bool(flags & (sublime.ADD_TO_SELECTION | sublime.REPLACE_MRU)):\n        return False\n    if existing_view_group == active_group:\n        return True\n    return not bool(flags & sublime.FORCE_GROUP)\n\n\ndef open_file(\n    window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1\n) -> Promise[Optional[sublime.View]]:\n    \"\"\"\n    Open a file asynchronously.\n    It is only safe to call this function from the UI thread.\n    The provided uri MUST be a file URI\n    \"\"\"\n    file = parse_uri(uri)[1]\n    # window.open_file brings the file to focus if it's already opened, which we don't want (unless it's supposed\n    # to open as a separate view).\n    view = window.find_open_file(file)\n    if view and _return_existing_view(flags, window.get_view_index(view)[0], window.active_group(), group):\n        return Promise.resolve(view)\n\n    was_already_open = view is not None\n    view = window.open_file(file, flags, group)\n    if not view.is_loading():\n        if was_already_open and (flags & sublime.SEMI_TRANSIENT):\n            # workaround bug https://github.com/sublimehq/sublime_text/issues/2411 where transient view might not get\n            # its view listeners initialized.\n            sublime_plugin.check_view_event_listeners(view)  # type: ignore\n        # It's already loaded. Possibly already open in a tab.\n        return Promise.resolve(view)\n\n    # Is the view opening right now? Then return the associated unresolved promise\n    for fn, value in opening_files.items():\n        if fn == file or os.path.samefile(fn, file):\n            # Return the unresolved promise. A future on_load event will resolve the promise.\n            return value[0]\n\n    # Prepare a new promise to be resolved by a future on_load event (see the event listener in main.py)\n    def fullfill(resolve: ResolveFunc[Optional[sublime.View]]) -> None:\n        global opening_files\n        # Save the promise in the first element of the tuple -- except we cannot yet do that here\n        opening_files[file] = (None, resolve)  # type: ignore\n\n    promise = Promise(fullfill)\n    tup = opening_files[file]\n    # Save the promise in the first element of the tuple so that the for-loop above can return it\n    opening_files[file] = (promise, tup[1])\n    return promise\n\n\ndef center_selection(v: sublime.View, r: Range) -> sublime.View:\n    selection = range_to_region(r, v)\n    v.run_command(\"lsp_selection_set\", {\"regions\": [(selection.a, selection.a)]})\n    window = v.window()\n    if window:\n        window.focus_view(v)\n    if int(sublime.version()) >= 4124:\n        v.show_at_center(selection.begin(), animate=False)\n    else:\n        # TODO: remove later when a stable build lands\n        v.show_at_center(selection.begin())  # type: ignore\n    return v\n\n\ndef open_in_browser(uri: str) -> None:\n    # NOTE: Remove this check when on py3.8.\n    if not uri.lower().startswith((\"http://\", \"https://\")):\n        uri = \"https://\" + uri\n    if not webbrowser.open(uri):\n        sublime.status_message(\"failed to open: \" + uri)\n\n\ndef open_externally(uri: str, take_focus: bool) -> bool:\n    \"\"\"\n    A blocking function that invokes the OS's \"open with default extension\"\n    \"\"\"\n    try:\n        # TODO: handle take_focus\n        if sublime.platform() == \"windows\":\n            os.startfile(uri)  # type: ignore\n        elif sublime.platform() == \"osx\":\n            subprocess.check_call((\"/usr/bin/open\", uri))\n        else:  # linux\n            subprocess.check_call((\"xdg-open\", uri))\n        return True\n    except Exception as ex:\n        exception_log(\"Failed to open {}\".format(uri), ex)\n        return False\n", "path": "plugin/core/open.py"}], "after_files": [{"content": "from .logging import exception_log\nfrom .promise import Promise\nfrom .promise import ResolveFunc\nfrom .protocol import DocumentUri\nfrom .protocol import Range\nfrom .protocol import UINT_MAX\nfrom .typing import Dict, Tuple, Optional\nfrom .typing import cast\nfrom .url import parse_uri\nfrom .views import range_to_region\nfrom urllib.parse import unquote, urlparse\nimport os\nimport re\nimport sublime\nimport sublime_plugin\nimport subprocess\nimport webbrowser\n\n\nopening_files = {}  # type: Dict[str, Tuple[Promise[Optional[sublime.View]], ResolveFunc[Optional[sublime.View]]]]\nFRAGMENT_PATTERN = re.compile(r'^L?(\\d+)(?:,(\\d+))?(?:-L?(\\d+)(?:,(\\d+))?)?')\n\n\ndef lsp_range_from_uri_fragment(fragment: str) -> Optional[Range]:\n    match = FRAGMENT_PATTERN.match(fragment)\n    if match:\n        selection = {'start': {'line': 0, 'character': 0}, 'end': {'line': 0, 'character': 0}}  # type: Range\n        # Line and column numbers in the fragment are assumed to be 1-based and need to be converted to 0-based\n        # numbers for the LSP Position structure.\n        start_line, start_column, end_line, end_column = [max(0, int(g) - 1) if g else None for g in match.groups()]\n        if start_line:\n            selection['start']['line'] = start_line\n            selection['end']['line'] = start_line\n        if start_column:\n            selection['start']['character'] = start_column\n            selection['end']['character'] = start_column\n        if end_line:\n            selection['end']['line'] = end_line\n            selection['end']['character'] = UINT_MAX\n        if end_column is not None:\n            selection['end']['character'] = end_column\n        return selection\n    return None\n\n\ndef open_file_uri(\n    window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1\n) -> Promise[Optional[sublime.View]]:\n\n    decoded_uri = unquote(uri)  # decode percent-encoded characters\n    parsed = urlparse(decoded_uri)\n    open_promise = open_file(window, decoded_uri, flags, group)\n    if parsed.fragment:\n        selection = lsp_range_from_uri_fragment(parsed.fragment)\n        if selection:\n            return open_promise.then(lambda view: _select_and_center(view, cast(Range, selection)))\n    return open_promise\n\n\ndef _select_and_center(view: Optional[sublime.View], r: Range) -> Optional[sublime.View]:\n    if view:\n        return center_selection(view, r)\n    return None\n\n\ndef _return_existing_view(flags: int, existing_view_group: int, active_group: int, specified_group: int) -> bool:\n    if specified_group > -1:\n        return existing_view_group == specified_group\n    if bool(flags & (sublime.ADD_TO_SELECTION | sublime.REPLACE_MRU)):\n        return False\n    if existing_view_group == active_group:\n        return True\n    return not bool(flags & sublime.FORCE_GROUP)\n\n\ndef _find_open_file(window: sublime.Window, fname: str, group: int = -1) -> Optional[sublime.View]:\n    \"\"\"A replacement for Window.find_open_file that prefers the active view instead of the leftmost one.\"\"\"\n    _group = window.active_group() if group == -1 else group\n    view = window.active_view_in_group(_group)\n    if fname == view.file_name():\n        return view\n    return window.find_open_file(fname, group)\n\n\ndef open_file(\n    window: sublime.Window, uri: DocumentUri, flags: int = 0, group: int = -1\n) -> Promise[Optional[sublime.View]]:\n    \"\"\"\n    Open a file asynchronously.\n    It is only safe to call this function from the UI thread.\n    The provided uri MUST be a file URI\n    \"\"\"\n    file = parse_uri(uri)[1]\n    # window.open_file brings the file to focus if it's already opened, which we don't want (unless it's supposed\n    # to open as a separate view).\n    view = _find_open_file(window, file)\n    if view and _return_existing_view(flags, window.get_view_index(view)[0], window.active_group(), group):\n        return Promise.resolve(view)\n\n    was_already_open = view is not None\n    view = window.open_file(file, flags, group)\n    if not view.is_loading():\n        if was_already_open and (flags & sublime.SEMI_TRANSIENT):\n            # workaround bug https://github.com/sublimehq/sublime_text/issues/2411 where transient view might not get\n            # its view listeners initialized.\n            sublime_plugin.check_view_event_listeners(view)  # type: ignore\n        # It's already loaded. Possibly already open in a tab.\n        return Promise.resolve(view)\n\n    # Is the view opening right now? Then return the associated unresolved promise\n    for fn, value in opening_files.items():\n        if fn == file or os.path.samefile(fn, file):\n            # Return the unresolved promise. A future on_load event will resolve the promise.\n            return value[0]\n\n    # Prepare a new promise to be resolved by a future on_load event (see the event listener in main.py)\n    def fullfill(resolve: ResolveFunc[Optional[sublime.View]]) -> None:\n        global opening_files\n        # Save the promise in the first element of the tuple -- except we cannot yet do that here\n        opening_files[file] = (None, resolve)  # type: ignore\n\n    promise = Promise(fullfill)\n    tup = opening_files[file]\n    # Save the promise in the first element of the tuple so that the for-loop above can return it\n    opening_files[file] = (promise, tup[1])\n    return promise\n\n\ndef center_selection(v: sublime.View, r: Range) -> sublime.View:\n    selection = range_to_region(r, v)\n    v.run_command(\"lsp_selection_set\", {\"regions\": [(selection.a, selection.a)]})\n    window = v.window()\n    if window:\n        window.focus_view(v)\n    if int(sublime.version()) >= 4124:\n        v.show_at_center(selection.begin(), animate=False)\n    else:\n        # TODO: remove later when a stable build lands\n        v.show_at_center(selection.begin())  # type: ignore\n    return v\n\n\ndef open_in_browser(uri: str) -> None:\n    # NOTE: Remove this check when on py3.8.\n    if not uri.lower().startswith((\"http://\", \"https://\")):\n        uri = \"https://\" + uri\n    if not webbrowser.open(uri):\n        sublime.status_message(\"failed to open: \" + uri)\n\n\ndef open_externally(uri: str, take_focus: bool) -> bool:\n    \"\"\"\n    A blocking function that invokes the OS's \"open with default extension\"\n    \"\"\"\n    try:\n        # TODO: handle take_focus\n        if sublime.platform() == \"windows\":\n            os.startfile(uri)  # type: ignore\n        elif sublime.platform() == \"osx\":\n            subprocess.check_call((\"/usr/bin/open\", uri))\n        else:  # linux\n            subprocess.check_call((\"xdg-open\", uri))\n        return True\n    except Exception as ex:\n        exception_log(\"Failed to open {}\".format(uri), ex)\n        return False\n", "path": "plugin/core/open.py"}]}