Skip to content

Commit acaa479

Browse files
authored
line and offset are 0 based in corsa (#119)
1 parent ad112bc commit acaa479

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ parameters:
9090
type: string
9191
default: 'any,ts-perf1,ts-perf2,ts-perf3,ts-perf4,ts-perf5,ts-perf6,ts-perf7,ts-perf8,ts-perf9,ts-perf10,ts-perf11,ts-perf12'
9292
- name: TS_GO
93-
displayName: boolean to describe if building ts-go
93+
displayName: building ts-go
9494
type: boolean
9595
default: false
9696

ts-perf/packages/commands/src/benchmark/measurelsp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ async function runPerf(options: CLIOpts) {
280280
await connection.sendRequest(protocol.ReferencesRequest.method, {
281281
textDocument: { uri: fileUri },
282282
position: {
283-
line: command.args.line,
284-
character: command.args.offset,
283+
line: command.args.line - 1,
284+
character: command.args.offset - 1,
285285
},
286286
context: { includeDeclaration: true },
287287
} as protocol.ReferenceParams);
@@ -307,8 +307,8 @@ async function runPerf(options: CLIOpts) {
307307
{
308308
textDocument: { uri: fileUri },
309309
position: {
310-
line: command.args.line,
311-
character: command.args.offset,
310+
line: command.args.line - 1,
311+
character: command.args.offset - 1,
312312
},
313313
} as protocol.CompletionParams,
314314
);

0 commit comments

Comments
 (0)