mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 11:49:38 +00:00
@@ -454,7 +454,7 @@ connection.onFoldingRanges((params, token) => {
|
||||
}, null, `Error while computing folding regions for ${params.textDocument.uri}`, token);
|
||||
});
|
||||
|
||||
connection.onRequest('$/textDocument/selectionRanges', async (params, token) => {
|
||||
connection.onSelectionRanges((params, token) => {
|
||||
return runSafe(() => {
|
||||
const document = documents.get(params.textDocument.uri);
|
||||
const positions: Position[] = params.positions;
|
||||
@@ -465,8 +465,8 @@ connection.onRequest('$/textDocument/selectionRanges', async (params, token) =>
|
||||
return htmlMode.getSelectionRanges(document, positions);
|
||||
}
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
}, null, `Error while computing selection ranges for ${params.textDocument.uri}`, token);
|
||||
return [];
|
||||
}, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user