[css] update service (for #47788)

This commit is contained in:
Martin Aeschlimann
2018-04-16 14:16:31 +02:00
parent 6657623b98
commit d516e62375
3 changed files with 5 additions and 6 deletions

View File

@@ -279,8 +279,7 @@ connection.onRenameRequest((renameParameters, token) => {
connection.onRequest(FoldingRangesRequest.type, (params, token) => {
return runSafe(() => {
let document = documents.get(params.textDocument.uri);
let stylesheet = stylesheets.get(document);
return getLanguageService(document).findFoldingRegions(document, stylesheet);
return getLanguageService(document).getFoldingRanges(document, { maxRanges: params.maxRanges });
}, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
});