Skip to content

Commit

Permalink
[Code] fix editor goto line (#32094)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedragon authored and zfy0701 committed Feb 27, 2019
1 parent ef185b1 commit e7c5c2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x-pack/plugins/code/public/components/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ export class EditorComponent extends React.Component<IProps> {
this.editor = await this.monaco.loadFile(repo, file, text, lang, revision);
this.editor.onMouseDown((e: editorInterfaces.IEditorMouseEvent) => {
if (e.target.type === monaco.editor.MouseTargetType.GUTTER_LINE_NUMBERS) {
const { repo: repoName, org, resource, pathType, path } = this.props.match.params;
const uri = `${resource}/${org}/${repoName}/${pathType}/${revision}/${path}`;
const uri = `${repo}/blob/${revision}/${file}`;
history.push(`/${uri}!L${e.target.position.lineNumber}:0`);
}
this.monaco!.container.focus();
Expand Down

0 comments on commit e7c5c2a

Please sign in to comment.