Skip to content

Commit d3cd4fc

Browse files
authored
Fix vcFormat not working and other case comparison bugs. (#12620)
1 parent d8a6a98 commit d3cd4fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Extension/src/LanguageServer/settings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ export class CppSettings extends Settings {
459459
public get inlayHintsReferenceOperatorShowSpace(): boolean { return this.getAsBoolean("inlayHints.referenceOperator.showSpace"); }
460460
public get isEnhancedColorizationEnabled(): boolean {
461461
return this.getAsString("enhancedColorization").toLowerCase() === "enabled"
462-
&& this.intelliSenseEngine === "default"
462+
&& this.intelliSenseEngine.toLowerCase() === "default"
463463
&& vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
464464
}
465465
public get formattingEngine(): string { return this.getAsString("formatting"); }
@@ -523,7 +523,7 @@ export class CppSettings extends Settings {
523523
public get vcFormatWrapPreserveBlocks(): string { return this.getAsString("vcFormat.wrap.preserveBlocks"); }
524524
public get dimInactiveRegions(): boolean {
525525
return this.getAsBoolean("dimInactiveRegions")
526-
&& this.intelliSenseEngine === "default" && vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
526+
&& this.intelliSenseEngine.toLowerCase() === "default" && vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
527527
}
528528
public get sshTargetsView(): string { return this.getAsString("sshTargetsView"); }
529529

@@ -894,7 +894,7 @@ export class CppSettings extends Settings {
894894
// This is intentionally not async to avoid races due to multiple entrancy.
895895
public useVcFormat(document: vscode.TextDocument): boolean {
896896
if (this.formattingEngine !== "default") {
897-
return this.formattingEngine === "vcformat";
897+
return this.formattingEngine.toLowerCase() === "vcformat";
898898
}
899899
if (this.clangFormatStyle && this.clangFormatStyle !== "file") {
900900
// If a clang-format style other than file is specified, don't try to switch to vcFormat.

0 commit comments

Comments
 (0)