소스 검색

Avoids pinning commit details by default

main
Eric Amodio 2 년 전
부모
커밋
2954a5e75f
6개의 변경된 파일11개의 추가작업 그리고 10개의 파일을 삭제
  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 파일 보기

@ -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 파일 보기

@ -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 파일 보기

@ -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 파일 보기

@ -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 파일 보기

@ -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 파일 보기

@ -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',
});

불러오는 중...
취소
저장