Skip to content

Commit 622b60b

Browse files
fix: minimap section header display uncompletely on first load:microsoft#209603 (microsoft#209605)
* fix: minimap section header display uncompletely on first load:microsoft#209603 * Recompute section headers when tokens change (with a larger delay) --------- Co-authored-by: Alexandru Dima <[email protected]>
1 parent 3ebe5a4 commit 622b60b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ export class SectionHeaderDetector extends Disposable implements IEditorContribu
8282
this.computeSectionHeaders.schedule();
8383
}));
8484

85+
this._register(editor.onDidChangeModelTokens((e) => {
86+
if (!this.computeSectionHeaders.isScheduled()) {
87+
this.computeSectionHeaders.schedule(1000);
88+
}
89+
}));
90+
8591
this.computeSectionHeaders = this._register(new RunOnceScheduler(() => {
8692
this.findSectionHeaders();
8793
}, 250));

0 commit comments

Comments
 (0)