Add Linearization

This commit is contained in:
Josh Johnson 2015-11-22 02:37:00 -05:00
parent 30e8222717
commit 4c1e6d05b9
4 changed files with 31 additions and 14 deletions

12
src/utils/RangeUtils.ts Normal file
View 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;
}