Skip to content

Commit

Permalink
Fix vcFormat not working and other case comparison bugs. (#12620)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-mcmanus authored Aug 23, 2024
1 parent d8a6a98 commit d3cd4fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Extension/src/LanguageServer/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ export class CppSettings extends Settings {
public get inlayHintsReferenceOperatorShowSpace(): boolean { return this.getAsBoolean("inlayHints.referenceOperator.showSpace"); }
public get isEnhancedColorizationEnabled(): boolean {
return this.getAsString("enhancedColorization").toLowerCase() === "enabled"
&& this.intelliSenseEngine === "default"
&& this.intelliSenseEngine.toLowerCase() === "default"
&& vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
}
public get formattingEngine(): string { return this.getAsString("formatting"); }
Expand Down Expand Up @@ -523,7 +523,7 @@ export class CppSettings extends Settings {
public get vcFormatWrapPreserveBlocks(): string { return this.getAsString("vcFormat.wrap.preserveBlocks"); }
public get dimInactiveRegions(): boolean {
return this.getAsBoolean("dimInactiveRegions")
&& this.intelliSenseEngine === "default" && vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
&& this.intelliSenseEngine.toLowerCase() === "default" && vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
}
public get sshTargetsView(): string { return this.getAsString("sshTargetsView"); }

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

0 comments on commit d3cd4fc

Please sign in to comment.