Skip to content

Commit b4a90c6

Browse files
authored
Merge branch 'main' into seanmcm/avoidUnnecessaryCancelRetryWithGitHubCopilot
2 parents de21b83 + 9efde54 commit b4a90c6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ export interface Client {
776776
PauseCodeAnalysis(): void;
777777
ResumeCodeAnalysis(): void;
778778
CancelCodeAnalysis(): void;
779-
handleConfigurationSelectCommand(): Promise<void>;
779+
handleConfigurationSelectCommand(config?: string): Promise<void>;
780780
handleConfigurationProviderSelectCommand(): Promise<void>;
781781
handleShowActiveCodeAnalysisCommands(): Promise<void>;
782782
handleShowIdleCodeAnalysisCommands(): Promise<void>;
@@ -3268,11 +3268,11 @@ export class DefaultClient implements Client {
32683268
/**
32693269
* command handlers
32703270
*/
3271-
public async handleConfigurationSelectCommand(): Promise<void> {
3271+
public async handleConfigurationSelectCommand(config?: string): Promise<void> {
32723272
await this.ready;
32733273
const configNames: string[] | undefined = this.configuration.ConfigurationNames;
32743274
if (configNames) {
3275-
const index: number = await ui.showConfigurations(configNames);
3275+
const index: number = config ? configNames.indexOf(config) : await ui.showConfigurations(configNames);
32763276
if (index < 0) {
32773277
return;
32783278
}

Extension/src/LanguageServer/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,13 @@ async function installCompiler(sender?: any): Promise<void> {
584584
telemetry.logLanguageServerEvent('installCompiler', telemetryProperties);
585585
}
586586

587-
async function onSelectConfiguration(): Promise<void> {
587+
async function onSelectConfiguration(config?: string): Promise<void> {
588588
if (!isFolderOpen()) {
589589
void vscode.window.showInformationMessage(localize("configuration.select.first", 'Open a folder first to select a configuration.'));
590590
} else {
591591
// This only applies to the active client. You cannot change the configuration for
592592
// a client that is not active since that client's UI will not be visible.
593-
return clients.ActiveClient.handleConfigurationSelectCommand();
593+
return clients.ActiveClient.handleConfigurationSelectCommand(config);
594594
}
595595
}
596596

0 commit comments

Comments
 (0)