diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 8d157ccb2e81b2a5a9e23aaa7aa6797b690ab3ed..0a0b6f820b01c41c72195faab4f89d9db5b07abb 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -136,7 +136,7 @@ export class DefinitionAction extends EditorAction { return editorService.openEditor({ resource: uri, options: { - selection: range, + selection: Range.collapseToStart(range), revealIfVisible: !sideBySide } }, sideBySide).then(editor => { @@ -634,4 +634,4 @@ registerThemingParticipant((theme, collector) => { if (activeLinkForeground) { collector.addRule(`.monaco-editor.${theme.selector} .goto-definition-link { color: ${activeLinkForeground} !important; }`); } -}); \ No newline at end of file +});