Skip to content

Commit

Permalink
Use positions and helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandella committed Jul 23, 2016
1 parent e914271 commit 6b21500
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2418,9 +2418,17 @@ abstract class MoveQuoteMatch extends BaseMovement {
failed: true
};
}

let startPos = new Position(position.line, start);
let endPos = new Position(position.line, end);
if (!this.includeSurrounding) {
startPos = startPos.getRight();
endPos = endPos.getLeft();
}

return {
start: new Position(position.line, start + (this.includeSurrounding ? 0 : 1)),
stop: new Position(position.line, end + (this.includeSurrounding ? 0 : -1))
start: startPos,
stop: endPos
};
}

Expand Down

0 comments on commit 6b21500

Please sign in to comment.