mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +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