aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--code/src/extension.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/code/src/extension.ts b/code/src/extension.ts
index bdad1568a..0fa092573 100644
--- a/code/src/extension.ts
+++ b/code/src/extension.ts
@@ -26,15 +26,13 @@ export function activate(context: vscode.ExtensionContext) {
26 let request: ExtendSelectionParams = { 26 let request: ExtendSelectionParams = {
27 textDocument: { uri: editor.document.uri.toString() }, 27 textDocument: { uri: editor.document.uri.toString() },
28 selections: editor.selections.map((s) => { 28 selections: editor.selections.map((s) => {
29 return { start: s.start, end: s.end }; 29 return client.code2ProtocolConverter.asRange(s)
30 }) 30 })
31 } 31 }
32 let response = await client.sendRequest<ExtendSelectionResult>("m/extendSelection", request) 32 let response = await client.sendRequest<ExtendSelectionResult>("m/extendSelection", request)
33 editor.selections = response.selections.map((range) => { 33 editor.selections = response.selections.map((range) => {
34 return new vscode.Selection( 34 let r = client.protocol2CodeConverter.asRange(range)
35 new vscode.Position(range.start.line, range.start.character), 35 return new vscode.Selection(r.start, r.end)
36 new vscode.Position(range.end.line, range.end.character),
37 )
38 }) 36 })
39 }) 37 })
40 38
@@ -158,7 +156,9 @@ function setHighlights(
158 console.log(`unknown tag ${d.tag}`) 156 console.log(`unknown tag ${d.tag}`)
159 continue 157 continue
160 } 158 }
161 byTag[d.tag].push(d.range) 159 byTag[d.tag].push(
160 client.protocol2CodeConverter.asRange(d.range)
161 )
162 } 162 }
163 163
164 for (let tag in byTag) { 164 for (let tag in byTag) {