-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoToDefinition opens new editor group #17
Comments
+1 this started happening for me after updating to June 2018 vscode. |
FYI - I changed line 126 here by removing the optional '50' parameter and reloaded the extension and it goes to a new tab again - not a split editor: vscode.commands.executeCommand('vscode.executeDefinitionProvider',
editor.document.uri,
position
).then(result => {
if (result[0]) {
let found = result[0]
var newPositionS = position.with(found.range._start.line, found.range._start.character);
var newPositionE = position.with(found.range._end.line, found.range._end.character);
var newSelection = new vscode.Selection(newPositionS, newPositionE);
vscode.commands.executeCommand('vscode.open', found.uri, 50).then(result => {
var editor = vscode.window.activeTextEditor;
editor.selection = newSelection
vscode.commands.executeCommand('revealLine', {
lineNumber: newSelection.start.line,
at: 'center'
}).then(result => {
}, err => {
})
}, err => {
console.log(err)
})
}
return true
}) |
@mattmiller85 - Would you consider putting up a PR for this extension? Hopefully the owner would take it and publish a new version |
@berickson1 PR submitted - #19 |
Even when navigating within a file, GoToDefinition opens a new editor group
My regular keybinding for "editor.action.goToDeclaration" or using
>go to definition
from the command pallet does not cause the behavior.The text was updated successfully, but these errors were encountered: