11'use strict' ;
22import { Strings } from '../system' ;
3- import { CancellationTokenSource , commands , Disposable , QuickPickItem , QuickPickOptions , TextDocumentShowOptions , TextEditor , Uri , window } from 'vscode' ;
3+ import { CancellationTokenSource , commands , QuickPickItem , QuickPickOptions , TextDocumentShowOptions , TextEditor , Uri , window } from 'vscode' ;
44import { Commands , openEditor } from '../commands' ;
55import { configuration } from '../configuration' ;
66import { GlyphChars } from '../constants' ;
77import { GitLog , GitLogCommit , GitStashCommit } from '../gitService' ;
88import { Keyboard , KeyboardScope , KeyMapping , Keys } from '../keyboard' ;
99import { ResultsExplorer } from '../views/resultsExplorer' ;
10- // import { Logger } from '../logger';
1110
1211export function getQuickPickIgnoreFocusOut ( ) {
1312 return configuration . get < boolean > ( configuration . name ( 'advanced' ) ( 'quickPick' ) ( 'closeOnFocusOut' ) . value ) ;
1413}
1514
16- export function showQuickPickProgress ( message : string , mapping ?: KeyMapping , delay : boolean = false ) : CancellationTokenSource {
15+ export function showQuickPickProgress ( message : string , mapping ?: KeyMapping ) : CancellationTokenSource {
1716 const cancellation = new CancellationTokenSource ( ) ;
18-
19- if ( delay ) {
20- let disposable : Disposable ;
21- const timer = setTimeout ( ( ) => {
22- disposable && disposable . dispose ( ) ;
23- _showQuickPickProgress ( message , cancellation , mapping ) ;
24- } , 250 ) ;
25- disposable = cancellation . token . onCancellationRequested ( ( ) => clearTimeout ( timer ) ) ;
26- }
27- else {
28- _showQuickPickProgress ( message , cancellation , mapping ) ;
29- }
30-
17+ _showQuickPickProgress ( message , cancellation , mapping ) ;
3118 return cancellation ;
3219}
3320
3421async function _showQuickPickProgress ( message : string , cancellation : CancellationTokenSource , mapping ?: KeyMapping ) {
35- // Logger.log(`showQuickPickProgress`, `show`, message);
36-
3722 const scope : KeyboardScope | undefined = mapping && await Keyboard . instance . beginScope ( mapping ) ;
3823
3924 try {
@@ -46,8 +31,6 @@ async function _showQuickPickProgress(message: string, cancellation: Cancellatio
4631 // Not sure why this throws
4732 }
4833 finally {
49- // Logger.log(`showQuickPickProgress`, `cancel`, message);
50-
5134 cancellation . cancel ( ) ;
5235 scope && scope . dispose ( ) ;
5336 }
0 commit comments