From 6c35cedef1495561b7515aa29b40671e9312f5cc Mon Sep 17 00:00:00 2001 From: Tucker Kern Date: Thu, 31 Jan 2019 14:28:33 -0700 Subject: [PATCH 1/2] Fix regex to allow non-recursive includePath when constructing browse.path from includePath --- Extension/CHANGELOG.md | 3 +++ Extension/src/LanguageServer/configurations.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index d8f38b53a3..4645780895 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,8 @@ # C/C++ for Visual Studio Code Change Log +## Pull Request +* Allow the workspace root to be a non-recursive includePath. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) + ## 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) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 9474e055fa..7a75d5396b 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -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}"); } From 4fbd02096eff7fcb5ea01da74f6402e3b4e1df7f Mon Sep 17 00:00:00 2001 From: Tucker Kern Date: Thu, 31 Jan 2019 15:23:37 -0700 Subject: [PATCH 2/2] Adjust wording and location of change note --- Extension/CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 4645780895..7fa4064ff8 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,11 +1,10 @@ # C/C++ for Visual Studio Code Change Log -## Pull Request -* Allow the workspace root to be a non-recursive includePath. [#3121](https://github.com/Microsoft/vscode-cpptools/issues/3121) - ## 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