Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ITextSource.MoveOffsetTo: make AnchorMovementType parameter optional.

  • Loading branch information...
commit fba2d7c2739ddbf9f5da62d32840610b2c7e994d 1 parent daa1cff
@dgrunwald dgrunwald authored
View
6 ICSharpCode.NRefactory.CSharp/Refactoring/DocumentScript.cs
@@ -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,7 +147,7 @@ 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 {
@@ -155,7 +155,7 @@ public TrackedSegment(DocumentScript script, int originalStart, int originalEnd)
}
public int EndOffset {
- get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd, AnchorMovementType.Default); }
+ get { return originalVersion.MoveOffsetTo(script.currentDocument.Version, originalEnd); }
}
}
}
View
2  ICSharpCode.NRefactory/Editor/ITextSource.cs
@@ -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);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.