Add Linearization
This commit is contained in:
parent
30e8222717
commit
4c1e6d05b9
4 changed files with 31 additions and 14 deletions
12
src/utils/RangeUtils.ts
Normal file
12
src/utils/RangeUtils.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
import { TextDocument, Range, Position } from 'vscode';
|
||||
|
||||
export function getRangeForDocument(document: TextDocument): Range {
|
||||
let lastLineIndex = (document.lineCount - 1);
|
||||
let range = new Range(new Position(0, 0), new Position(lastLineIndex, Number.MAX_VALUE));
|
||||
|
||||
range = document.validateRange(range);
|
||||
|
||||
return range;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue