Skip to content

Commit

Permalink
Convert region to range using toRange method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapil Borle committed Feb 14, 2017
1 parent c96eb06 commit 4929ab6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/features/DocumentFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,7 @@ class PSDocumentFormattingEditProvider implements
let undoStopAfter = !this.aggregateUndoStop || (ruleIndex === this.ruleOrder.length - 1 && markerIndex === edits.length - 1);
let undoStopBefore = !this.aggregateUndoStop || (ruleIndex === 0 && markerIndex === 0);
let edit: ScriptRegion = edits[markerIndex];
let editRange: Range = new vscode.Range(
edit.startLineNumber - 1,
edit.startColumnNumber - 1,
edit.endLineNumber - 1,
edit.endColumnNumber - 1);
let editRange: Range = toRange(edit);

if (range === null || range.contains(editRange.start)) {

Expand Down

0 comments on commit 4929ab6

Please sign in to comment.