Skip to content

Commit edf8e0a

Browse files
authored
Merge pull request #10504 from microsoft/main
Merge for 1.14.2 (2nd time)
2 parents 4083075 + 82b8f26 commit edf8e0a

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,25 @@ export class DefaultClient implements Client {
971971
paths.push(localize("installCompiler.string", "Help me install a compiler"));
972972
paths.push(localize("noConfig.string", "Do not configure a compiler (not recommended)"));
973973
const index: number = await this.showSelectDefaultCompiler(paths);
974+
let action: string;
975+
switch (index) {
976+
case -1:
977+
action = 'escaped';
978+
break;
979+
case paths.length - 1:
980+
action = 'disable';
981+
break;
982+
case paths.length - 2:
983+
action = 'help';
984+
break;
985+
case paths.length - 3:
986+
action = 'browse';
987+
break;
988+
default:
989+
action = 'select compiler';
990+
break;
991+
}
992+
telemetry.logLanguageServerEvent('compilerSelection', { action });
974993
if (index === -1) {
975994
if (showSecondPrompt) {
976995
this.showPrompt(selectCompiler, true);
@@ -1012,6 +1031,7 @@ export class DefaultClient implements Client {
10121031
}
10131032

10141033
async promptSelectCompiler(isCommand: boolean): Promise<void> {
1034+
secondPromptCounter = 0;
10151035
if (compilerDefaults === undefined) {
10161036
return;
10171037
}
@@ -1034,7 +1054,7 @@ export class DefaultClient implements Client {
10341054
} else if (!isCommand && (compilerDefaults.compilerPath === undefined)) {
10351055
this.showPrompt(selectCompiler, false);
10361056
} else {
1037-
this.handleCompilerQuickPick(false);
1057+
this.handleCompilerQuickPick(isCommand);
10381058
}
10391059
}
10401060
}

0 commit comments

Comments
 (0)