Skip to content

Commit

Permalink
Enhancement: find matching line when showing current file
Browse files Browse the repository at this point in the history
  • Loading branch information
randy3k committed Jul 25, 2017
1 parent fedec73 commit ce0b8bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/commands/show_file_at_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ def render_text(self, view):

class GsShowCurrentFileAtCommitCommand(GsShowFileAtCommitCommand):

def run(self, commit_hash, lineno=1, lang=None):
@util.view.single_cursor_coords
def run(self, coords, commit_hash, lineno=None, lang=None):
if not lang:
lang = self.window.active_view().settings().get('syntax')
if lineno is None:
lineno = self.find_matching_lineno(None, commit_hash, coords[0] + 1)
super().run(
commit_hash=commit_hash,
filepath=self.file_path,
Expand Down

0 comments on commit ce0b8bc

Please sign in to comment.