Permalink
Browse files

ITextSource.MoveOffsetTo: make AnchorMovementType parameter optional.

  • Loading branch information...
dgrunwald committed Mar 23, 2012
1 parent daa1cff commit fba2d7c2739ddbf9f5da62d32840610b2c7e994d
@@ -91,7 +91,7 @@ public override int GetCurrentOffset(TextLocation originalDocumentLocation)
public override int GetCurrentOffset(int originalDocumentOffset)
{
- return originalDocument.Version.MoveOffsetTo(currentDocument.Version, originalDocumentOffset, AnchorMovementType.Default);
+ return originalDocument.Version.MoveOffsetTo(currentDocument.Version, originalDocumentOffset);
}
public override void FormatText(AstNode node)
@@ -147,15 +147,15 @@ public TrackedSegment(DocumentScript script, int originalStart, int originalEnd)
}
public int Offset {
- get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalStart, AnchorMovementType.Default); }
+ get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalStart); }
}
public int Length {
get { return this.EndOffset - this.Offset; }
}
public int EndOffset {
- get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd, AnchorMovementType.Default); }
+ get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd); }
}
}
}
@@ -200,6 +200,6 @@ public interface ITextSourceVersion
/// Calculates where the offset has moved in the other buffer version.
/// </summary>
/// <exception cref="ArgumentException">Raised if 'other' belongs to a different document than this checkpoint.</exception>
- int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement);
+ int MoveOffsetTo(ITextSourceVersion other, int oldOffset, AnchorMovementType movement = AnchorMovementType.Default);
}
}

0 comments on commit fba2d7c

Please sign in to comment.