[html] update server

This commit is contained in:
Martin Aeschlimann
2017-11-01 23:19:23 +01:00
parent 8326351ee0
commit 5ed577b00c
8 changed files with 44 additions and 42 deletions

View File

@@ -326,9 +326,9 @@ connection.onRequest(DocumentColorRequest.type, params => {
connection.onRequest(ColorPresentationRequest.type, params => {
let document = documents.get(params.textDocument.uri);
if (document) {
let mode = languageModes.getModeAtPosition(document, params.colorInfo.range.start);
let mode = languageModes.getModeAtPosition(document, params.range.start);
if (mode && mode.getColorPresentations) {
return mode.getColorPresentations(document, params.colorInfo);
return mode.getColorPresentations(document, params.color, params.range);
}
}
return [];