Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd786b0f

Browse files
authored
Merge pull requestmicrosoft#2029 from Microsoft/seanmcm/0_17_3_release
Seanmcm/0 17 3 release
2 parents5883747 +df7b77b commitd786b0f

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

‎Extension/CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#C/C++ for Visual Studio Code Change Log
22

3-
##Version 0.17.2: May 21, 2018
3+
##Version 0.17.3: May 22, 2018
4+
* Add support for`${workspaceFolder:folderName}`.[#1774](https://github.com/Microsoft/vscode-cpptools/issues/1774)
45
* Fix infinite loop during initialization on Windows.[#1960](https://github.com/Microsoft/vscode-cpptools/issues/1960)
56
* Fix main process IntelliSense-related crashes.[#2006](https://github.com/Microsoft/vscode-cpptools/issues/2006)
67
* Fix deadlock after formatting large files.[#2007](https://github.com/Microsoft/vscode-cpptools/issues/2007)

‎Extension/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Extension/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name":"cpptools",
33
"displayName":"C/C++",
44
"description":"C/C++ IntelliSense, debugging, and code browsing.",
5-
"version":"0.17.2",
5+
"version":"0.17.3",
66
"publisher":"ms-vscode",
77
"preview":true,
88
"icon":"LanguageCCPP_color_128x.png",

‎Extension/src/common.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function resolveVariables(input: string, additionalEnvironment: {[key: st
152152
}
153153

154154
// Replace environment and configuration variables.
155-
letregexp:RegExp=/\$\{((env|config)(.|:))?(.*?)\}/g;
155+
letregexp:RegExp=/\$\{((env|config|workspaceFolder)(.|:))?(.*?)\}/g;
156156
letret:string=input.replace(regexp,(match:string,ignored1:string,varType:string,ignored2:string,name:string)=>{
157157
// Historically, if the variable didn't have anything before the "." or ":"
158158
// it was assumed to be an environment variable
@@ -180,6 +180,18 @@ export function resolveVariables(input: string, additionalEnvironment: {[key: st
180180
newValue=(config) ?config.toString() :undefined;
181181
break;
182182
}
183+
case"workspaceFolder":{
184+
// Only replace ${workspaceFolder:name} variables for now.
185+
// We may consider doing replacement of ${workspaceFolder} here later, but we would have to update the language server and also
186+
// intercept messages with paths in them and add the ${workspaceFolder} variable back in (e.g. for light bulb suggestions)
187+
if(name&&vscode.workspace&&vscode.workspace.workspaceFolders){
188+
letfolder:vscode.WorkspaceFolder=vscode.workspace.workspaceFolders.find(folder=>folder.name.toLocaleLowerCase()===name.toLocaleLowerCase());
189+
if(folder){
190+
newValue=folder.uri.fsPath;
191+
}
192+
}
193+
break;
194+
}
183195
default:{assert.fail("unknown varType matched");}
184196
}
185197
return(newValue) ?newValue :match;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp