Skip to content

Commit 777b386

Browse files
committed
Local history max entries not visually applied to timeline (fix microsoft#145721)
1 parent 7705039 commit 777b386

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ export class LocalHistoryTimeline extends Disposable implements IWorkbenchContri
7777
private registerListeners(): void {
7878

7979
// History changes
80-
this._register(this.workingCopyHistoryService.onDidAddEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry, false /* entry added */)));
81-
this._register(this.workingCopyHistoryService.onDidChangeEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry, false /* entry changed */)));
82-
this._register(this.workingCopyHistoryService.onDidReplaceEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry, true /* entry replaced */)));
83-
this._register(this.workingCopyHistoryService.onDidRemoveEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry, true /* entry removed */)));
84-
this._register(this.workingCopyHistoryService.onDidRemoveEntries(() => this.onDidChangeWorkingCopyHistoryEntry(undefined /* all entries */, true /* entry removed */)));
85-
this._register(this.workingCopyHistoryService.onDidMoveEntries(() => this.onDidChangeWorkingCopyHistoryEntry(undefined /* all entries */, true /* entry moved */)));
80+
this._register(this.workingCopyHistoryService.onDidAddEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry)));
81+
this._register(this.workingCopyHistoryService.onDidChangeEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry)));
82+
this._register(this.workingCopyHistoryService.onDidReplaceEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry)));
83+
this._register(this.workingCopyHistoryService.onDidRemoveEntry(e => this.onDidChangeWorkingCopyHistoryEntry(e.entry)));
84+
this._register(this.workingCopyHistoryService.onDidRemoveEntries(() => this.onDidChangeWorkingCopyHistoryEntry(undefined /* all entries */)));
85+
this._register(this.workingCopyHistoryService.onDidMoveEntries(() => this.onDidChangeWorkingCopyHistoryEntry(undefined /* all entries */)));
8686

8787
// Configuration changes
8888
this._register(this.configurationService.onDidChangeConfiguration(e => {
@@ -92,13 +92,13 @@ export class LocalHistoryTimeline extends Disposable implements IWorkbenchContri
9292
}));
9393
}
9494

95-
private onDidChangeWorkingCopyHistoryEntry(entry: IWorkingCopyHistoryEntry | undefined, reset: boolean): void {
95+
private onDidChangeWorkingCopyHistoryEntry(entry: IWorkingCopyHistoryEntry | undefined): void {
9696

9797
// Re-emit as timeline change event
9898
this._onDidChange.fire({
9999
id: LocalHistoryTimeline.ID,
100100
uri: entry?.workingCopy.resource,
101-
reset
101+
reset: true // there is no other way to indicate that items might have been replaced/removed
102102
});
103103
}
104104

0 commit comments

Comments
 (0)