Skip to content

Commit

Permalink
fix commitDetail overwrite loss of control issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kahole committed Dec 29, 2023
1 parent 7d575c5 commit 1e3efab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/visitAtPointCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,7 @@ export async function visitCommit(repository: MagitRepository, commitHash: strin
const commit: MagitCommit = { hash: commitHash, message: '', parents: [] };

const uri = CommitDetailView.encodeLocation(repository, commit.hash);
return ViewUtils.showView(uri, new CommitDetailView(uri, commit, header.stdout, stashToMagitChanges(repository, nameStatus.stdout, diffs.stdout)));
const commitDetailView = ViewUtils.createOrUpdateView(repository, uri, () => new CommitDetailView(uri, commit, header.stdout, stashToMagitChanges(repository, nameStatus.stdout, diffs.stdout)));

return ViewUtils.showView(uri, commitDetailView);
}

0 comments on commit 1e3efab

Please sign in to comment.