From 3851c475800e9200b2419733c15506c40c4d371f Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 31 May 2018 11:19:58 +0200 Subject: [PATCH] Fix: showQuickPick keeps showing infinite progress (fixes #50863) --- src/vs/workbench/browser/parts/quickinput/quickInput.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickinput/quickInput.ts b/src/vs/workbench/browser/parts/quickinput/quickInput.ts index 36943437c86a4..883dca93f0edb 100644 --- a/src/vs/workbench/browser/parts/quickinput/quickInput.ts +++ b/src/vs/workbench/browser/parts/quickinput/quickInput.ts @@ -632,10 +632,15 @@ export class QuickInputService extends Component implements IQuickInputService { const d = token.onCancellationRequested(() => this.close()); this.controller.result.then(() => d.dispose(), () => d.dispose()); + const wasController = this.controller; + const delay = TPromise.timeout(800); - delay.then(() => this.progressBar.infinite(), () => { /* ignore */ }); + delay.then(() => { + if (this.controller === wasController) { + this.progressBar.infinite(); + } + }, () => { /* ignore */ }); - const wasController = this.controller; this.controller.ready.then(() => { delay.cancel(); if (this.controller !== wasController) {