Skip to content

Commit

Permalink
Merge pull request #10504 from microsoft/main
Browse files Browse the repository at this point in the history
Merge for 1.14.2 (2nd time)
  • Loading branch information
sean-mcmanus authored Feb 10, 2023
2 parents 4083075 + 82b8f26 commit edf8e0a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,25 @@ export class DefaultClient implements Client {
paths.push(localize("installCompiler.string", "Help me install a compiler"));
paths.push(localize("noConfig.string", "Do not configure a compiler (not recommended)"));
const index: number = await this.showSelectDefaultCompiler(paths);
let action: string;
switch (index) {
case -1:
action = 'escaped';
break;
case paths.length - 1:
action = 'disable';
break;
case paths.length - 2:
action = 'help';
break;
case paths.length - 3:
action = 'browse';
break;
default:
action = 'select compiler';
break;
}
telemetry.logLanguageServerEvent('compilerSelection', { action });
if (index === -1) {
if (showSecondPrompt) {
this.showPrompt(selectCompiler, true);
Expand Down Expand Up @@ -1012,6 +1031,7 @@ export class DefaultClient implements Client {
}

async promptSelectCompiler(isCommand: boolean): Promise<void> {
secondPromptCounter = 0;
if (compilerDefaults === undefined) {
return;
}
Expand All @@ -1034,7 +1054,7 @@ export class DefaultClient implements Client {
} else if (!isCommand && (compilerDefaults.compilerPath === undefined)) {
this.showPrompt(selectCompiler, false);
} else {
this.handleCompilerQuickPick(false);
this.handleCompilerQuickPick(isCommand);
}
}
}
Expand Down

0 comments on commit edf8e0a

Please sign in to comment.