From d058d43fddb3c12d6a1377368805a175cec28e16 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 21 Jan 2025 19:21:48 +0100 Subject: [PATCH] based --- packages/common/src/types/Position.ts | 2 +- packages/common/src/types/Range.ts | 4 ++-- packages/common/src/types/Selection.ts | 4 ++-- packages/common/src/types/position.test.ts | 2 +- packages/common/src/types/range.test.ts | 2 +- packages/common/src/types/selection.test.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/common/src/types/Position.ts b/packages/common/src/types/Position.ts index a86cc847d0..c4b25bc076 100644 --- a/packages/common/src/types/Position.ts +++ b/packages/common/src/types/Position.ts @@ -152,7 +152,7 @@ export class Position { * Return a concise string representation of the position. 1-based. * @returns concise representation **/ - public conciseOneBase(): string { + public conciseOneBased(): string { return `${this.line + 1}:${this.character + 1}`; } diff --git a/packages/common/src/types/Range.ts b/packages/common/src/types/Range.ts index 48ff67cf51..02aa3a6ea9 100644 --- a/packages/common/src/types/Range.ts +++ b/packages/common/src/types/Range.ts @@ -155,8 +155,8 @@ export class Range { * Return a concise string representation of the range. 1-based. * @returns concise representation **/ - public conciseOneBase(): string { - return `${this.start.conciseOneBase()}-${this.end.conciseOneBase()}`; + public conciseOneBased(): string { + return `${this.start.conciseOneBased()}-${this.end.conciseOneBased()}`; } public toString(): string { diff --git a/packages/common/src/types/Selection.ts b/packages/common/src/types/Selection.ts index a8c7118c83..5a5dc838db 100644 --- a/packages/common/src/types/Selection.ts +++ b/packages/common/src/types/Selection.ts @@ -85,8 +85,8 @@ export class Selection extends Range { * Return a concise string representation of the selection. 1-based. * @returns concise representation **/ - public conciseOneBase(): string { - return `${this.start.conciseOneBase()}->${this.end.conciseOneBase()}`; + public conciseOneBased(): string { + return `${this.start.conciseOneBased()}->${this.end.conciseOneBased()}`; } public toString(): string { diff --git a/packages/common/src/types/position.test.ts b/packages/common/src/types/position.test.ts index c370648f56..af095df91e 100644 --- a/packages/common/src/types/position.test.ts +++ b/packages/common/src/types/position.test.ts @@ -71,6 +71,6 @@ suite("Position", () => { test("concise", () => { assert.equal(new Position(1, 2).concise(), "1:2"); - assert.equal(new Position(1, 2).conciseOneBase(), "2:3"); + assert.equal(new Position(1, 2).conciseOneBased(), "2:3"); }); }); diff --git a/packages/common/src/types/range.test.ts b/packages/common/src/types/range.test.ts index 07d63000b4..ade8585b07 100644 --- a/packages/common/src/types/range.test.ts +++ b/packages/common/src/types/range.test.ts @@ -116,6 +116,6 @@ suite("Range", () => { test("concise", () => { assert.equal(new Range(1, 2, 3, 4).concise(), "1:2-3:4"); - assert.equal(new Range(1, 2, 3, 4).conciseOneBase(), "2:3-4:5"); + assert.equal(new Range(1, 2, 3, 4).conciseOneBased(), "2:3-4:5"); }); }); diff --git a/packages/common/src/types/selection.test.ts b/packages/common/src/types/selection.test.ts index 159c9b13d3..4b967e1c82 100644 --- a/packages/common/src/types/selection.test.ts +++ b/packages/common/src/types/selection.test.ts @@ -52,6 +52,6 @@ suite("Selection", () => { test("concise", () => { assert.equal(new Selection(1, 2, 3, 4).concise(), "1:2->3:4"); - assert.equal(new Selection(1, 2, 3, 4).conciseOneBase(), "2:3->4:5"); + assert.equal(new Selection(1, 2, 3, 4).conciseOneBased(), "2:3->4:5"); }); });