Skip to content

Commit

Permalink
Merge b0ac8c4 into 4ad0e59
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed Jul 12, 2019
2 parents 4ad0e59 + b0ac8c4 commit 0e149fd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/commands/log_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ def on_activated(self, view):
if not window:
return

if view not in window.views():
return

panel_view = window.find_output_panel('show_commit_info')
if not panel_view:
return
Expand Down Expand Up @@ -341,15 +344,18 @@ def run(self):
view = self.window.active_view()

self.selections = view.sel()
if not len(self.selections) == 1:
self.window.status_message("You can only do actions on one commit at a time.")
return

lines = util.view.get_lines_from_regions(view, self.selections)
line = lines[0]

self._commit_hash = extract_commit_hash(line)
self._file_path = self.file_path

if not len(self.selections) == 1:
self.window.status_message("You can only do actions on one commit at a time.")
commit_hash = extract_commit_hash(line)
if not commit_hash:
return

self._commit_hash = commit_hash
self._file_path = self.file_path

super().run(commit_hash=self._commit_hash, file_path=self._file_path)

0 comments on commit 0e149fd

Please sign in to comment.