Skip to content

Commit 42b3c28

Browse files
authored
Fix issue with settings changes not handled properly in multiroot (#10458)
1 parent 6b6c16e commit 42b3c28

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { createProtocolFilter } from './protocolFilter';
3838
import { DataBinding } from './dataBinding';
3939
import minimatch = require("minimatch");
4040
import { updateLanguageConfigurations, CppSourceStr, clients } from './extension';
41-
import { SettingsTracker, getTracker } from './settingsTracker';
41+
import { SettingsTracker } from './settingsTracker';
4242
import { getTestHook, TestHook } from '../testHook';
4343
import { getCustomConfigProviders, CustomConfigurationProvider1, isSameProviderExtensionId } from '../LanguageServer/customProviders';
4444
import * as fs from 'fs';
@@ -1083,7 +1083,7 @@ export class DefaultClient implements Client {
10831083
}
10841084
this.storagePath = storagePath;
10851085
const rootUri: vscode.Uri | undefined = this.RootUri;
1086-
this.settingsTracker = getTracker(rootUri);
1086+
this.settingsTracker = new SettingsTracker(rootUri);
10871087

10881088
try {
10891089
let isFirstClient: boolean = false;

Extension/src/LanguageServer/settingsTracker.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type FilterFunction = (key: string, val: string, settings: vscode.WorkspaceConfi
1414
type KeyValuePair = { key: string; value: string };
1515

1616
const maxSettingLengthForTelemetry: number = 50;
17-
let cache: SettingsTracker;
1817

1918
export class SettingsTracker {
2019
private previousCppSettings: { [key: string]: any } = {};
@@ -207,10 +206,3 @@ export class SettingsTracker {
207206
return value1 === value2;
208207
}
209208
}
210-
211-
export function getTracker(resource: vscode.Uri | undefined): SettingsTracker {
212-
if (!cache) {
213-
cache = new SettingsTracker(resource);
214-
}
215-
return cache;
216-
}

0 commit comments

Comments
 (0)