Преглед на файлове

Fixes #2641 Support search and open file history change

main
oghazi преди 1 година
committed by Eric Amodio
родител
ревизия
d2052eb9db
променени са 2 файла, в които са добавени 15 реда и са изтрити 1 реда
  1. +5
    -0
      src/commands/quickCommand.buttons.ts
  2. +10
    -1
      src/commands/quickCommand.steps.ts

+ 5
- 0
src/commands/quickCommand.buttons.ts Целия файл

@ -127,6 +127,11 @@ export const ShowDetailsViewQuickInputButton: QuickInputButton = {
tooltip: 'Open Details',
};
export const OpenChangesViewQuickInputButton: QuickInputButton = {
iconPath: new ThemeIcon('compare-changes'),
tooltip: 'Open Changes',
};
export const ShowResultsInSideBarQuickInputButton: QuickInputButton = {
iconPath: new ThemeIcon('link-external'),
tooltip: 'Show Results in Side Bar',

+ 10
- 1
src/commands/quickCommand.steps.ts Целия файл

@ -119,6 +119,7 @@ import {
createPickStep,
endSteps,
LoadMoreQuickInputButton,
OpenChangesViewQuickInputButton,
OpenInNewWindowQuickInputButton,
PickCommitQuickInputButton,
RevealInSideBarQuickInputButton,
@ -1067,7 +1068,11 @@ export async function* pickCommitStep<
picked != null &&
(typeof picked === 'string' ? commit.ref === picked : picked.includes(commit.ref)),
{
buttons: [ShowDetailsViewQuickInputButton, RevealInSideBarQuickInputButton],
buttons: [
ShowDetailsViewQuickInputButton,
RevealInSideBarQuickInputButton,
OpenChangesViewQuickInputButton,
],
compact: true,
icon: true,
},
@ -1101,6 +1106,7 @@ export async function* pickCommitStep<
],
onDidClickItemButton: (quickpick, button, item) => {
if (CommandQuickPickItem.is(item)) return;
const fileName = `${item.item.file?.path}`;
switch (button) {
case ShowDetailsViewQuickInputButton:
@ -1114,6 +1120,9 @@ export async function* pickCommitStep<
expand: true,
});
break;
case OpenChangesViewQuickInputButton:
void CommitActions.openChanges(fileName, item.item, {});
break;
}
},
onDidClickButton: (quickpick, button) => {

Зареждане…
Отказ
Запис