Skip to content

Commit

Permalink
Fix find_open_file incompatibility with older ST versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann authored and rwols committed Jan 28, 2024
1 parent 3561214 commit 8023408
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/core/open.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .constants import ST_VERSION
from .logging import exception_log
from .promise import Promise
from .promise import ResolveFunc
Expand Down Expand Up @@ -79,7 +80,7 @@ def _find_open_file(window: sublime.Window, fname: str, group: int = -1) -> Opti
view = window.active_view_in_group(_group)
if view and fname == view.file_name():
return view
return window.find_open_file(fname, group)
return window.find_open_file(fname, group) if ST_VERSION >= 4136 else window.find_open_file(fname)


def open_file(
Expand Down

0 comments on commit 8023408

Please sign in to comment.