Use the model we already have

This commit is contained in:
Matt Bierner 2018-06-18 14:15:31 -07:00
parent f1e4efb9e6
commit 6f1d0e6973

View file

@ -195,12 +195,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
}
private findDefinition(target: IMouseTarget): TPromise<Location[]> {
let model = this.editor.getModel();
const model = this.editor.getModel();
if (!model) {
return TPromise.as(null);
}
return getDefinitionsAtPosition(this.editor.getModel(), target.position);
return getDefinitionsAtPosition(model, target.position);
}
private gotoDefinition(target: IMouseTarget, sideBySide: boolean): TPromise<any> {