提交 d49c0673 编写于 作者: B bitshiftza

Swapped order of algorithms

上级 3c76a1ce
......@@ -162,10 +162,10 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
}
private getPreviewValue(textEditorModel: ITextModel, startLineNumber: number) {
let rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);
let rangeToUse = this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber);
const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber;
if (numberOfLinesInRange < 3 || numberOfLinesInRange >= GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES) {
rangeToUse = this.getPreviewRangeBasedOnBrackets(textEditorModel, startLineNumber);
if (numberOfLinesInRange >= GotoDefinitionWithMouseEditorContribution.MAX_SOURCE_PREVIEW_LINES) {
rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);
}
const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册