Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 2f15ddd

Browse files
committed
Use VSCode Range type for better type safety
- Update resolveDialecticUrlPlacement return type to use vscode.Range - Better type safety and consistency with VSCode APIs - Range represents position + extent in document more precisely than separate line/column
1 parent 8155807 commit 2f15ddd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

extension/src/fileNavigation.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function resolveDialecticUrlPlacement(
1919
outputChannel: vscode.OutputChannel,
2020
baseUri?: vscode.Uri,
2121
placementMemory?: Map<string, PlacementState>
22-
): Promise<{ line: number; column: number; document: vscode.TextDocument } | null> {
22+
): Promise<{ range: vscode.Range; document: vscode.TextDocument } | null> {
2323
try {
2424
// Parse the dialectic URL to extract components
2525
const parsed = parseDialecticUrl(dialecticUrl);
@@ -110,7 +110,10 @@ export async function resolveDialecticUrlPlacement(
110110
targetColumn = parsed.line.startColumn || 1;
111111
}
112112

113-
return { line: targetLine, column: targetColumn, document };
113+
return {
114+
range: new vscode.Range(targetLine - 1, targetColumn - 1, targetLine - 1, targetColumn - 1),
115+
document
116+
};
114117

115118
} catch (error) {
116119
outputChannel.appendLine(`Error resolving dialectic URL: ${error}`);

0 commit comments

Comments
 (0)