Bläddra i källkod

Avoids pinning commit details by default

main
Eric Amodio 2 år sedan
förälder
incheckning
2954a5e75f
6 ändrade filer med 11 tillägg och 10 borttagningar
  1. +5
    -4
      src/commands/showCommitsInView.ts
  2. +2
    -2
      src/plus/webviews/graph/graphWebview.ts
  3. +1
    -1
      src/plus/webviews/timeline/timelineWebview.ts
  4. +1
    -1
      src/plus/webviews/timeline/timelineWebviewView.ts
  5. +1
    -1
      src/webviews/commitDetails/commitDetailsWebviewView.ts
  6. +1
    -1
      src/webviews/rebase/rebaseEditor.ts

+ 5
- 4
src/commands/showCommitsInView.ts Visa fil

@ -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({

+ 2
- 2
src/plus/webviews/graph/graphWebview.ts Visa fil

@ -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

+ 1
- 1
src/plus/webviews/timeline/timelineWebview.ts Visa fil

@ -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;

+ 1
- 1
src/plus/webviews/timeline/timelineWebviewView.ts Visa fil

@ -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;

+ 1
- 1
src/webviews/commitDetails/commitDetailsWebviewView.ts Visa fil

@ -128,7 +128,7 @@ export class CommitDetailsWebviewView extends WebviewViewBase
commit = await this.container.git.getCommit(commit.repoPath, commit.ref);
}
}
this.updateCommit(commit, { pinned: pin ?? true });
this.updateCommit(commit, { pinned: pin ?? false });
}
}

+ 1
- 1
src/webviews/rebase/rebaseEditor.ts Visa fil

@ -447,7 +447,7 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl
const showDetailsView = configuration.get('rebaseEditor.showDetailsView');
void GitActions.Commit.showDetailsView(commit, {
pin: true,
pin: false,
preserveFocus: true,
preserveVisibility: context.firstSelection ? showDetailsView === false : showDetailsView !== 'selection',
});

Laddar…
Avbryt
Spara