Skip to content

Commit

Permalink
fixes #119824
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed May 18, 2022
1 parent 06cf633 commit 93bd5ba
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/vs/workbench/contrib/tasks/common/problemCollectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export class StartStopProblemCollector extends AbstractProblemCollector implemen
});
}

protected async processLineInternal(line: string): Promise<void> {
protected async processLineInternal(line: string, forceApplyMatch?: boolean): Promise<void> {
let markerMatch = this.tryFindMarker(line);
if (!markerMatch) {
return;
Expand All @@ -373,7 +373,7 @@ export class StartStopProblemCollector extends AbstractProblemCollector implemen
let resource = await markerMatch.resource;
let resourceAsString = resource.toString();
this.removeResourceToClean(owner, resourceAsString);
let shouldApplyMatch = await this.shouldApplyMatch(markerMatch);
let shouldApplyMatch = await this.shouldApplyMatch(markerMatch) || forceApplyMatch;
if (shouldApplyMatch) {
this.recordMarker(markerMatch.marker, owner, resourceAsString);
if (this.currentOwner !== owner || this.currentResource !== resourceAsString) {
Expand Down Expand Up @@ -436,7 +436,8 @@ export class WatchingProblemCollector extends AbstractProblemCollector implement
}
const oldLines = Array.from(this.lines);
for (const line of oldLines) {
await this.processLineInternal(line);
// we know that the model was removed, so apply the match
await this.processLineInternal(line, true);
}
});
setTimeout(async () => {
Expand All @@ -456,7 +457,7 @@ export class WatchingProblemCollector extends AbstractProblemCollector implement
}
}

protected async processLineInternal(line: string): Promise<void> {
protected async processLineInternal(line: string, forceApplyMatch?: boolean): Promise<void> {
if (await this.tryBegin(line) || this.tryFinish(line)) {
return;
}
Expand All @@ -469,7 +470,7 @@ export class WatchingProblemCollector extends AbstractProblemCollector implement
let owner = markerMatch.description.owner;
let resourceAsString = resource.toString();
this.removeResourceToClean(owner, resourceAsString);
let shouldApplyMatch = await this.shouldApplyMatch(markerMatch);
let shouldApplyMatch = await this.shouldApplyMatch(markerMatch) || forceApplyMatch;
if (shouldApplyMatch) {
this.recordMarker(markerMatch.marker, owner, resourceAsString);
if (this.currentOwner !== owner || this.currentResource !== resourceAsString) {
Expand Down

0 comments on commit 93bd5ba

Please sign in to comment.