We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16017b2 + 3726851 commit fd54668Copy full SHA for fd54668
src/providers/DocumentLinkProvider.ts
@@ -64,10 +64,10 @@ export class DocumentLinkProvider implements vscode.DocumentLinkProvider {
64
offset += method.location.range.start.line + 1;
65
}
66
67
- // move the cursor
68
- const cursor = editor.selection.active;
69
- const newPosition = cursor.with(offset, 0);
70
- editor.selection = new vscode.Selection(newPosition, newPosition);
+ const line = editor.document.lineAt(offset);
+ const range = new vscode.Range(line.range.start, line.range.start);
+ editor.selection = new vscode.Selection(range.start, range.start);
+ editor.revealRange(range, vscode.TextEditorRevealType.InCenter);
71
72
return new vscode.DocumentLink(link.range, link.uri);
73
0 commit comments