Skip to content

Commit c570369

Browse files
authored
Fixes for 0.7 (#431)
* Fixes for 0.7 * Fix some tabbing spacing
1 parent 3a84302 commit c570369

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"stopOnEntry": false,
3737
"sourceMaps": true,
3838
"outFiles": [
39-
"${workspaceFolder}/dist/**/*.js"
39+
"${workspaceFolder}/out/**/*.js"
4040
],
4141
"preLaunchTask": "compile",
4242
},

src/configuration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,8 +1115,7 @@ export async function initFromStateAndSettings(): Promise<void> {
11151115
// More than one setting may be updated on one settings.json save,
11161116
// so make sure to OR the dirty state when it's calculated by a formula (not a simple TRUE value).
11171117
vscode.workspace.onDidChangeConfiguration(async e => {
1118-
if (vscode.workspace.workspaceFolders &&
1119-
e.affectsConfiguration('makefile', vscode.workspace.workspaceFolders[0].uri)) {
1118+
if (vscode.workspace.workspaceFolders && e.affectsConfiguration('makefile')) {
11201119
// We are interested in updating only some relevant properties.
11211120
// A subset of these should also trigger an IntelliSense config provider update.
11221121
// Avoid unnecessary updates (for example, when settings are modified via the extension quickPick).

src/cpptools.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export class CppConfigurationProvider implements cpp.CustomConfigurationProvider
2828
private workspaceBrowseConfiguration: cpp.WorkspaceBrowseConfiguration = { browsePath: [] };
2929

3030
private getConfiguration(uri: vscode.Uri): SourceFileConfigurationItem | undefined {
31-
const norm_path: string = path.normalize(uri.fsPath);
31+
let norm_path: string = path.normalize(uri.fsPath);
32+
if (process.platform === "win32") {
33+
norm_path = norm_path.toUpperCase();
34+
}
3235

3336
// First look in the file index computed during the last configure.
3437
// If nothing is found and there is a configure running right now,

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ export class MakefileToolsExtension {
153153

154154
// These are the configurations processed during the current configure.
155155
// Store them in the 'delta' file index instead of the final one.
156-
provider.fileIndex.set(path.normalize(uri.fsPath), sourceFileConfigurationItem);
156+
provider.fileIndex.set(path.normalize((process.platform === "win32") ? uri.fsPath.toUpperCase() : uri.fsPath),
157+
sourceFileConfigurationItem);
157158
extension.getCppConfigurationProvider().logConfigurationProviderItem(sourceFileConfigurationItem);
158159

159160
let folder: string = path.dirname(filePath);

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ export function removeSurroundingQuotes(str: string): string {
463463

464464
// Quote given string if it contains space and is not quoted already
465465
export function quoteStringIfNeeded(str: string) : string {
466-
// No need to quote if there is no space present.
467-
if (!str.includes(" ")) {
466+
// No need to quote if there is no space or ampersand present.
467+
if (!str.includes(" ") && !str.includes("&")) {
468468
return str;
469469
}
470470

0 commit comments

Comments
 (0)