mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
[html] embedded folding ranges computed too many times (fixes #47712)
This commit is contained in:
@@ -57,10 +57,9 @@ export function getCSSMode(documentRegions: LanguageModelCache<HTMLDocumentRegio
|
||||
let embedded = embeddedCSSDocuments.get(document);
|
||||
return cssLanguageService.getColorPresentations(embedded, cssStylesheets.get(embedded), color, range);
|
||||
},
|
||||
getFoldingRanges(document: TextDocument, range: Range): FoldingRange[] {
|
||||
getFoldingRanges(document: TextDocument): FoldingRange[] {
|
||||
let embedded = embeddedCSSDocuments.get(document);
|
||||
let ranges = cssLanguageService.getFoldingRanges(embedded, {});
|
||||
return ranges.filter(r => r.startLine >= range.start.line && r.endLine < range.end.line);
|
||||
return cssLanguageService.getFoldingRanges(embedded, {});
|
||||
},
|
||||
onDocumentRemoved(document: TextDocument) {
|
||||
embeddedCSSDocuments.onDocumentRemoved(document);
|
||||
|
||||
Reference in New Issue
Block a user