@@ -167,6 +167,7 @@ import {
167167 PrioritizedDefinitionProvider ,
168168 DefinitionDocumentLinkProvider ,
169169 followDefinitionLinkCommand ,
170+ followDefinitionLink ,
170171 goToDefinitionLocalFirst ,
171172 resolveContextExpression ,
172173 showGlobalDocumentation ,
@@ -1298,22 +1299,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
12981299 followDefinitionLinkCommand ,
12991300 async ( documentUri : string , line : number , character : number ) => {
13001301 sendCommandTelemetryEvent ( "ccs.followDefinitionLink" ) ;
1301- if ( ! documentUri || typeof line !== "number" || typeof character !== "number" ) {
1302- return ;
1303- }
1304-
1305- const uri = vscode . Uri . parse ( documentUri ) ;
1306- const document =
1307- vscode . workspace . textDocuments . find ( ( doc ) => doc . uri . toString ( ) === documentUri ) ??
1308- ( await vscode . workspace . openTextDocument ( uri ) ) ;
1309-
1310- const position = new vscode . Position ( line , character ) ;
1311- const selectionRange = new vscode . Range ( position , position ) ;
1312- const editor = await vscode . window . showTextDocument ( document , { selection : selectionRange } ) ;
1313- editor . selection = new vscode . Selection ( position , position ) ;
1314- editor . revealRange ( selectionRange ) ;
1315-
1316- await goToDefinitionLocalFirst ( ) ;
1302+ await followDefinitionLink ( documentUri , line , character ) ;
13171303 }
13181304 ) ,
13191305 vscode . commands . registerCommand ( "vscode-objectscript.debug" , ( program : string , askArgs : boolean ) => {
0 commit comments