Skip to content

Commit

Permalink
Fix: showQuickPick keeps showing infinite progress (fixes #50863)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed May 31, 2018
1 parent c72c9fe commit 3851c47
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/vs/workbench/browser/parts/quickinput/quickInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3851c47

Please sign in to comment.