Skip to content

Commit

Permalink
when going to definition scroll to start of the region, not end (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Dec 21, 2022
1 parent 2ce155a commit f7afd40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/core/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def center_selection(v: sublime.View, r: Range) -> sublime.View:
if window:
window.focus_view(v)
if int(sublime.version()) >= 4124:
v.show_at_center(selection, animate=False)
v.show_at_center(selection.begin(), animate=False)
else:
# TODO: remove later when a stable build lands
v.show_at_center(selection) # type: ignore
v.show_at_center(selection.begin()) # type: ignore
return v


Expand Down

0 comments on commit f7afd40

Please sign in to comment.