diff --git a/src/commands/showCommitsInView.ts b/src/commands/showCommitsInView.ts index 3924a63..a934696 100644 --- a/src/commands/showCommitsInView.ts +++ b/src/commands/showCommitsInView.ts @@ -1,8 +1,9 @@ import type { TextEditor, Uri } from 'vscode'; -import { executeGitCommand } from '../commands/gitCommands.actions'; +import { executeGitCommand, GitActions } from '../commands/gitCommands.actions'; import { Commands } from '../constants'; import type { Container } from '../container'; import { GitUri } from '../git/gitUri'; +import { GitReference } from '../git/models/reference'; import { createSearchQueryForCommits } from '../git/search'; import { Logger } from '../logger'; import { showFileNotUnderSourceControlWarningMessage, showGenericErrorMessage } from '../messages'; @@ -79,9 +80,9 @@ export class ShowCommitsInViewCommand extends ActiveEditorCommand { } if (args.refs.length === 1) { - return this.container.commitDetailsView.show({ - commit: { ref: args.refs[0], refType: 'revision', repoPath: args.repoPath!, name: '' }, - }); + return GitActions.Commit.showDetailsView( + GitReference.create(args.refs[0], args.repoPath!, { refType: 'revision' }), + ); } return executeGitCommand({ diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index c3bdd3f..124f581 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -435,7 +435,7 @@ export class GraphWebview extends WebviewBase { if (this.selection != null) { void GitActions.Commit.showDetailsView(this.selection[0], { - pin: true, + pin: false, preserveFocus: true, preserveVisibility: this._showDetailsView === false, }); @@ -879,7 +879,7 @@ export class GraphWebview extends WebviewBase { if (commits == null) return; void GitActions.Commit.showDetailsView(commits[0], { - pin: true, + pin: false, preserveFocus: true, preserveVisibility: this._firstSelection ? this._showDetailsView === false diff --git a/src/plus/webviews/timeline/timelineWebview.ts b/src/plus/webviews/timeline/timelineWebview.ts index 248d483..ec0e35e 100644 --- a/src/plus/webviews/timeline/timelineWebview.ts +++ b/src/plus/webviews/timeline/timelineWebview.ts @@ -148,7 +148,7 @@ export class TimelineWebview extends WebviewBase { const commit = await repository.getCommit(params.data.id); if (commit == null) return; - void GitActions.Commit.showDetailsView(commit, { pin: true, preserveFocus: true }); + void GitActions.Commit.showDetailsView(commit, { pin: false, preserveFocus: true }); }); break; diff --git a/src/plus/webviews/timeline/timelineWebviewView.ts b/src/plus/webviews/timeline/timelineWebviewView.ts index 7a560b6..26372fd 100644 --- a/src/plus/webviews/timeline/timelineWebviewView.ts +++ b/src/plus/webviews/timeline/timelineWebviewView.ts @@ -126,7 +126,7 @@ export class TimelineWebviewView extends WebviewViewBase { const commit = await repository.getCommit(params.data.id); if (commit == null) return; - void GitActions.Commit.showDetailsView(commit, { pin: true, preserveFocus: true }); + void GitActions.Commit.showDetailsView(commit, { pin: false, preserveFocus: true }); }); break; diff --git a/src/webviews/commitDetails/commitDetailsWebviewView.ts b/src/webviews/commitDetails/commitDetailsWebviewView.ts index 93baeeb..92cb50f 100644 --- a/src/webviews/commitDetails/commitDetailsWebviewView.ts +++ b/src/webviews/commitDetails/commitDetailsWebviewView.ts @@ -128,7 +128,7 @@ export class CommitDetailsWebviewView extends WebviewViewBase