Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Changed

- Changes the _Search & Compare_ view to be separate (detached) from the new grouped _GitLens_ view
- API search in the _Launchpad_ is activated only when nothing is found locally

### Fixed

Expand Down
1 change: 1 addition & 0 deletions src/commands/quickCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface QuickPickStep<T extends QuickPickItem = QuickPickItem> {
onDidActivate?(quickpick: QuickPick<DirectiveQuickPickItem | T>): void;

onDidAccept?(quickpick: QuickPick<DirectiveQuickPickItem | T>): boolean | Promise<boolean>;
onDidChangeActive?(quickpick: QuickPick<DirectiveQuickPickItem | T>): boolean | Promise<boolean>;
onDidChangeValue?(quickpick: QuickPick<DirectiveQuickPickItem | T>): boolean | Promise<boolean>;
onDidChangeSelection?(quickpick: QuickPick<DirectiveQuickPickItem | T>, selection: readonly T[]): void;
onDidClickButton?(
Expand Down
5 changes: 5 additions & 0 deletions src/commands/quickWizard.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,11 @@ export abstract class QuickWizardCommandBase extends GlCommandBase {
firstActiveChange = false;
}

if (step.onDidChangeActive != null) {
const cancel = step.onDidChangeActive(quickpick);
if (cancel) return;
}

if (rootStep.command != null || quickpick.activeItems.length === 0) return;

const command = quickpick.activeItems[0];
Expand Down
11 changes: 11 additions & 0 deletions src/plus/launchpad/launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,17 @@ export class LaunchpadCommand extends QuickCommand<State> {

this.savedSearch = undefined;
},

onDidChangeActive: quickpick => {
const hasActiveLaunchpadItems = quickpick.activeItems.find(i => 'item' in i);
if (hasActiveLaunchpadItems) {
context.updateItemsDebouncer.cancel();
return true;
}

return false;
},

onDidChangeValue: async quickpick => {
const { value } = quickpick;
this.savedSearch = value;
Expand Down
Loading