mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
parent
711cd94734
commit
7800bd3492
|
@ -16,6 +16,7 @@ export function scrollEditorToLine(
|
|||
}
|
||||
|
||||
function toRevealRange(line: number, editor: vscode.TextEditor): vscode.Range {
|
||||
line = Math.max(0, line);
|
||||
const sourceLine = Math.floor(line);
|
||||
if (sourceLine >= editor.document.lineCount) {
|
||||
return new vscode.Range(editor.document.lineCount - 1, 0, editor.document.lineCount - 1, 0);
|
||||
|
|
Loading…
Reference in a new issue