Skip to content

Commit

Permalink
Fix regex to allow non-recursive includePath (#3122)
Browse files Browse the repository at this point in the history
* Fix regex to allow non-recursive includePath when constructing browse.path from includePath
  • Loading branch information
mill1000 authored and sean-mcmanus committed Feb 1, 2019
1 parent f978719 commit bf6b4aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Version 0.22.0-insiders February 5, 2019
* Fix signature help active parameter selection when parameter names are missing or subsets of each other. [#2952](https://github.com/Microsoft/vscode-cpptools/issues/2952)
* Render macro hover expansions as C/C++. [#3075](https://github.com/Microsoft/vscode-cpptools/issues/3075)
* Allow * in includePath to apply to browse.path when browse.path is not specified. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121)
* Tucker Kern (@mill1000) [PR #3122](https://github.com/Microsoft/vscode-cpptools/pull/3122)

## Version 0.21.0 January 23, 2019
### New Features
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ export class CppProperties {
// If the user doesn't set browse.path, copy the includePath over. Make sure ${workspaceFolder} is in there though...
configuration.browse.path = configuration.includePath.slice(0);
if (-1 === configuration.includePath.findIndex((value: string, index: number) => {
return !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\|\\\*\*|\/|\/\*\*)?$/g);
return !!value.match(/^\$\{(workspaceRoot|workspaceFolder)\}(\\\*{0,2}|\/\*{0,2})?$/g);
})) {
configuration.browse.path.push("${workspaceFolder}");
}
Expand Down

0 comments on commit bf6b4aa

Please sign in to comment.