Skip to content

Commit 89102dd

Browse files
committed
rename jump destination from uri to contents_path throughout
1 parent 86f5abe commit 89102dd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

packages/jupyterlab-go-to-definition/src/jump.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export interface IGlobalJump {
3737
line: number;
3838
column: number;
3939

40-
uri: string;
40+
contents_path: string;
4141
}

packages/jupyterlab-go-to-definition/src/jumpers/jumper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export abstract class CodeJumper {
197197
}
198198

199199
public global_jump(position: IGlobalJump, is_symlink = false) {
200-
let document_widget = this.document_manager.openOrReveal(position.uri);
200+
let document_widget = this.document_manager.openOrReveal(position.contents_path);
201201

202202
document_widget.revealed
203203
.then(() => {
@@ -285,7 +285,7 @@ export abstract class CodeJumper {
285285
editor_index: input_number,
286286
line: line_number,
287287
column: column,
288-
uri: path
288+
contents_path: path
289289
},
290290
is_symlink
291291
);

packages/jupyterlab-lsp/src/features/jump_to.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';
2222
import { ILSPAdapterManager, ILSPFeatureManager, PLUGIN_ID } from '../tokens';
2323
import { LabIcon } from '@jupyterlab/ui-components';
2424
import jumpToSvg from '../../style/icons/jump-to.svg';
25+
import { URLExt } from '@jupyterlab/coreutils';
2526

2627
export const jumpToIcon = new LabIcon({
2728
name: 'lsp:jump-to',
@@ -128,14 +129,14 @@ export class CMJumpToDefinition extends CodeMirrorIntegration {
128129
content: false
129130
}
130131
);
131-
this.jumper.global_jump({ uri: contents_path, ...jump_data }, false);
132+
this.jumper.global_jump({ contents_path, ...jump_data }, false);
132133
return;
133134
} catch (err) {
134135
console.warn(err);
135136
}
136137

137138
this.jumper.global_jump(
138-
{ uri: '.lsp_symlink/' + contents_path, ...jump_data },
139+
{ contents_path: URLExt.join('.lsp_symlink', contents_path), ...jump_data },
139140
true
140141
);
141142
}

0 commit comments

Comments
 (0)