Skip to content

Commit 50e0f86

Browse files
authored
Show the reload window message when caseSensitiveFileSupport is changed. (#12700)
* Show the reload window message when caseSensitiveFileSupport is changed.
1 parent fc5a084 commit 50e0f86

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ export class DefaultClient implements Client {
838838
public lastCustomBrowseConfiguration: PersistentFolderState<WorkspaceBrowseConfiguration | undefined> | undefined;
839839
public lastCustomBrowseConfigurationProviderId: PersistentFolderState<string | undefined> | undefined;
840840
public lastCustomBrowseConfigurationProviderVersion: PersistentFolderState<Version> | undefined;
841+
public currentCaseSensitiveFileSupport: PersistentWorkspaceState<boolean> | undefined;
841842
private registeredProviders: PersistentFolderState<string[]> | undefined;
842843

843844
private configStateReceived: ConfigStateReceived = { compilers: false, compileCommands: false, configProviders: undefined, timeout: false };
@@ -1457,6 +1458,9 @@ export class DefaultClient implements Client {
14571458
const workspaceSettings: CppSettings = new CppSettings();
14581459
const workspaceOtherSettings: OtherSettings = new OtherSettings();
14591460
const workspaceFolderSettingsParams: WorkspaceFolderSettingsParams[] = this.getAllWorkspaceFolderSettings();
1461+
if (this.currentCaseSensitiveFileSupport && workspaceSettings.isCaseSensitiveFileSupportEnabled !== this.currentCaseSensitiveFileSupport.Value) {
1462+
void util.promptForReloadWindowDueToSettingsChange();
1463+
}
14601464
return {
14611465
filesAssociations: workspaceOtherSettings.filesAssociations,
14621466
workspaceFallbackEncoding: workspaceOtherSettings.filesEncoding,
@@ -1484,7 +1488,7 @@ export class DefaultClient implements Client {
14841488
}
14851489

14861490
private async createLanguageClient(): Promise<void> {
1487-
const currentCaseSensitiveFileSupport: PersistentWorkspaceState<boolean> = new PersistentWorkspaceState<boolean>("CPP.currentCaseSensitiveFileSupport", false);
1491+
this.currentCaseSensitiveFileSupport = new PersistentWorkspaceState<boolean>("CPP.currentCaseSensitiveFileSupport", false);
14881492
let resetDatabase: boolean = false;
14891493
const serverModule: string = getLanguageServerFileName();
14901494
const exeExists: boolean = fs.existsSync(serverModule);
@@ -1527,9 +1531,9 @@ export class DefaultClient implements Client {
15271531
}
15281532

15291533
const workspaceSettings: CppSettings = new CppSettings();
1530-
if (workspaceSettings.isCaseSensitiveFileSupportEnabled !== currentCaseSensitiveFileSupport.Value) {
1534+
if (workspaceSettings.isCaseSensitiveFileSupportEnabled !== this.currentCaseSensitiveFileSupport.Value) {
15311535
resetDatabase = true;
1532-
currentCaseSensitiveFileSupport.Value = workspaceSettings.isCaseSensitiveFileSupportEnabled;
1536+
this.currentCaseSensitiveFileSupport.Value = workspaceSettings.isCaseSensitiveFileSupportEnabled;
15331537
}
15341538

15351539
const cacheStoragePath: string = util.getCacheStoragePath();

0 commit comments

Comments
 (0)