Skip to content

Commit e3b4177

Browse files
authored
Merge pull request #11639 from microsoft/main
Merge for 1.18.2 (2nd time)
2 parents 3f7f309 + 7d05139 commit e3b4177

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Extension/CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# C/C++ for Visual Studio Code Changelog
22

3-
## Version 1.18.2: November 7, 2023
3+
## Version 1.18.2: November 8, 2023
4+
### Enhancement
5+
* 'Extract to function' is enabled without `C_Cpp.experimentalFeatures` being set to `"enabled"`.
6+
47
### Bug Fixes
8+
* Fix 'Extract to function' for functions in a header file . [#11466](https://github.com/microsoft/vscode-cpptools/issues/11466)
9+
* Fix 'Extract to function' for functions in an anonymous namespace. [#11474](https://github.com/microsoft/vscode-cpptools/issues/11474)
10+
* Fix 'Extract to function' for C code with typedefs or structs. [#11475](https://github.com/microsoft/vscode-cpptools/issues/11475)
511
* Fix an IntelliSense crash when hovering over an invalid array index expression. [#11510](https://github.com/microsoft/vscode-cpptools/issues/11510)
612
* Fix 'Add #include' code actions not appearing for "is not a template" errors. [#11543](https://github.com/microsoft/vscode-cpptools/issues/11543)
713
* Fix 'Extract to function' bugs with formatting and selection. [#11614](https://github.com/microsoft/vscode-cpptools/issues/11614), [#11619](https://github.com/microsoft/vscode-cpptools/issues/11619)
814
* Fix 'Add #include' code actions being available for system headers that are already included. [#11618](https://github.com/microsoft/vscode-cpptools/issues/11618)
15+
* Fix an IntelliSense crash when selecting code.
916

1017
## Version 1.18.1: November 2, 2023
1118
### New Feature
@@ -20,7 +27,6 @@
2027
### Bug Fixes
2128
* Fix no error message getting shown if 'Extract to Function' creation fails. [#11567](https://github.com/microsoft/vscode-cpptools/issues/11567)
2229
* Fix an autocomplete crash bug (primarily on Mac).
23-
* Fix an IntelliSense crash when selecting code.
2430

2531
## Version 1.18.0: October 12, 2023
2632
### New Features

Extension/src/LanguageServer/Providers/codeActionProvider.ts

-7
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
8888
this.client.configuration.CurrentConfiguration?.compilerPathInCppPropertiesJson !== undefined ||
8989
!!this.client.configuration.CurrentConfiguration?.compileCommandsInCppPropertiesJson ||
9090
!!this.client.configuration.CurrentConfiguration?.configurationProviderInCppPropertiesJson;
91-
const hasExperimentalFeatures: boolean = new CppSettings().experimentalFeatures ?? false;
9291

9392
// Convert to vscode.CodeAction array
9493
let hasInlineMacro: boolean = false;
@@ -216,17 +215,11 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
216215
}
217216
} else if (command.command === "C_Cpp.ExtractToFunction" ||
218217
command.command === "C_Cpp.ExtractToMemberFunction") {
219-
if (!hasExperimentalFeatures) {
220-
return;
221-
}
222218
codeActionKind = CodeActionProvider.extractToFunctionKind;
223219
} else if (command.command === "C_Cpp.ExtractToFreeFunction") {
224220
// TODO: https://github.com/microsoft/vscode-cpptools/issues/11473 needs to be fixed.
225221
return;
226222
} else if (command.command === "C_Cpp.ExpandSelection") {
227-
if (!hasExperimentalFeatures) {
228-
return;
229-
}
230223
codeActionKind = CodeActionProvider.expandSelectionKind;
231224
}
232225
const vscodeCodeAction: vscode.CodeAction = {

0 commit comments

Comments
 (0)