Skip to content

Commit

Permalink
Fix duplicate config squiggles. (#5323)
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-mcmanus authored Apr 20, 2020
1 parent 7a0d5fe commit 0d0e004
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,16 @@ export class CppProperties {
const compilerPathStart: number = curText.search(/\s*\"compilerPath\"\s*:\s*\"/);
const compilerPathEnd: number = compilerPathStart === -1 ? -1 : curText.indexOf('"', curText.indexOf('"', curText.indexOf(":", compilerPathStart)) + 1) + 1;

let processedPaths: Set<string> = new Set<string>();

// Validate paths
for (let curPath of paths) {
if (processedPaths.has(curPath)) {
// Avoid duplicate squiggles for the same line.
// Squiggles for the same path on different lines are already handled below.
continue;
}
processedPaths.add(curPath);
const isCompilerPath: boolean = curPath === currentConfiguration.compilerPath;
// Resolve special path cases.
if (curPath === "${default}") {
Expand Down

0 comments on commit 0d0e004

Please sign in to comment.