From e6c7334b064e3b83dd7446a42789017f2d614d1c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 4 Dec 2021 15:35:41 -0500 Subject: [PATCH] Fixes retry action for Git commands --- src/commands/quickCommand.buttons.ts | 6 ++++++ src/commands/quickCommand.ts | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands/quickCommand.buttons.ts b/src/commands/quickCommand.buttons.ts index a5e6fa2..c02ee6b 100644 --- a/src/commands/quickCommand.buttons.ts +++ b/src/commands/quickCommand.buttons.ts @@ -37,6 +37,12 @@ export class ToggleQuickInputButton implements QuickInputButton { this._on = value; } + /** + * + * @param quickInput + * @returns `true` if the step should be retried (refreshed) + * + */ onDidClick?(quickInput: QuickInput): boolean | void | Promise; private getState() { diff --git a/src/commands/quickCommand.ts b/src/commands/quickCommand.ts index 83b75ad..fecbfee 100644 --- a/src/commands/quickCommand.ts +++ b/src/commands/quickCommand.ts @@ -190,8 +190,7 @@ export abstract class QuickCommand implements QuickPickItem { } async retry(): Promise { - await this.next(Directive.Back); - await this.next(); + await this.next(Directive.Noop); return this.value; }