File tree Expand file tree Collapse file tree
src/vs/platform/quickinput/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import { IQuickPick , IQuickPickItem , IQuickInputService } from 'vs/platform/quickinput/common/quickInput' ;
77import { IQuickAccessProvider , IQuickAccessRegistry , Extensions } from 'vs/platform/quickinput/common/quickAccess' ;
88import { Registry } from 'vs/platform/registry/common/platform' ;
9- import { CancellationToken } from 'vs/base/common/cancellation' ;
109import { localize } from 'vs/nls' ;
1110import { DisposableStore , IDisposable } from 'vs/base/common/lifecycle' ;
1211
@@ -33,6 +32,15 @@ export class HelpQuickAccessProvider implements IQuickAccessProvider {
3332 }
3433 } ) ) ;
3534
35+ // Also open a picker when we detect the user typed the exact
36+ // name of a provider (e.g. `?term` for terminals)
37+ disposables . add ( picker . onDidChangeValue ( value => {
38+ const providerDescriptor = this . registry . getQuickAccessProvider ( value . substr ( HelpQuickAccessProvider . PREFIX . length ) ) ;
39+ if ( providerDescriptor && providerDescriptor . prefix !== HelpQuickAccessProvider . PREFIX ) {
40+ this . quickInputService . quickAccess . show ( providerDescriptor . prefix ) ;
41+ }
42+ } ) ) ;
43+
3644 // Fill in all providers separated by editor/global scope
3745 const { editorProviders, globalProviders } = this . getQuickAccessProviders ( ) ;
3846 picker . items = editorProviders . length === 0 || globalProviders . length === 0 ?
You can’t perform that action at this time.
0 commit comments