mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-21 19:32:51 +01:00
validate preview range using model (#235932)
fixes https://github.com/microsoft/vscode/issues/205611
This commit is contained in:
@@ -229,7 +229,7 @@ export class GotoDefinitionAtPositionEditorContribution implements IEditorContri
|
||||
if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) {
|
||||
rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber);
|
||||
}
|
||||
|
||||
rangeToUse = textEditorModel.validateRange(rangeToUse);
|
||||
const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse);
|
||||
return previewValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user