Skip to content

Commit 5780e18

Browse files
authored
Fix a couple Configure IntelliSense bugs with config providers (#10861)
* Fix a couple more Configure IntelliSense bugs.
1 parent 3c6f603 commit 5780e18

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Extension/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Fix handling of sccache and clcache. [#7616](https://github.com/microsoft/vscode-cpptools/issues/7616)
66
* Fix an undefined reference regression. [PR #10824](https://github.com/microsoft/vscode-cpptools/pull/10824)
77
* Fix bugs with the "Configure IntelliSense" button. [#10810](https://github.com/microsoft/vscode-cpptools/issues/10810), [#10822](https://github.com/microsoft/vscode-cpptools/issues/10822), [#10827](https://github.com/microsoft/vscode-cpptools/issues/10827)
8+
* Fix a deadlock with Find All References. [#10855](https://github.com/microsoft/vscode-cpptools/issues/10855)
89

910
## Version 1.15.2: March 12, 2023
1011
### Enhancements

Extension/src/LanguageServer/client.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,9 +1819,13 @@ export class DefaultClient implements Client {
18191819
}
18201820
this.configStateReceived.configProviders.push(provider);
18211821
const selectedProvider: string | undefined = this.configuration.CurrentConfigurationProvider;
1822-
if (!selectedProvider) {
1822+
if (!selectedProvider || this.showConfigureIntelliSenseButton) {
18231823
this.handleConfigStatusOrPrompt("configProviders");
1824-
} else if (isSameProviderExtensionId(selectedProvider, provider.extensionId)) {
1824+
if (!selectedProvider) {
1825+
return;
1826+
}
1827+
}
1828+
if (isSameProviderExtensionId(selectedProvider, provider.extensionId)) {
18251829
this.onCustomConfigurationProviderRegistered(provider);
18261830
telemetry.logLanguageServerEvent("customConfigurationProvider", { "providerId": provider.extensionId });
18271831
} else if (selectedProvider === provider.name) {
@@ -2674,7 +2678,9 @@ export class DefaultClient implements Client {
26742678
}
26752679
const rootFolder: vscode.WorkspaceFolder | undefined = this.RootFolder;
26762680
const settings: CppSettings = new CppSettings(this.RootUri);
2677-
const configProviderNotSet: boolean = !settings.defaultConfigurationProvider && !this.configuration.CurrentConfiguration?.configurationProvider && !this.configuration.CurrentConfiguration?.configurationProviderInCppPropertiesJson;
2681+
const configProviderNotSet: boolean = !settings.defaultConfigurationProvider && !this.configuration.CurrentConfiguration?.configurationProvider &&
2682+
!this.configuration.CurrentConfiguration?.configurationProviderInCppPropertiesJson &&
2683+
(this.lastCustomBrowseConfigurationProviderId === undefined || this.lastCustomBrowseConfigurationProviderId.Value === undefined);
26782684
const compileCommandsNotSet: boolean = !settings.defaultCompileCommands && !this.configuration.CurrentConfiguration?.compileCommands && !this.configuration.CurrentConfiguration?.compileCommandsInCppPropertiesJson;
26792685

26802686
// Handle config providers

0 commit comments

Comments
 (0)