Vixen
02b45cc4
csharp
public readonly record struct TextChange

One edit: replace the characters in with .

No guide page documents this yet — the page shows what the code says about itself.

Remarks

An insertion is an empty span with text; a deletion is a span with empty text. Spans are always against the old text, so a batch of edits can be described without the caller having to adjust for its own earlier ones.

Fields and properties (3)

  • public TextSpan Span

    What to replace, in the old text's coordinates.

  • public string NewText

    What to put there. Empty to delete.

  • public int Delta

    Characters removed, minus characters added.

Methods (4)

  • public TextChange(TextSpan Span, string NewText)

    One edit: replace the characters in with .

  • public static TextChange Insert(int position, string text)

    An insertion at .

  • public static TextChange Delete(TextSpan span)

    A deletion of .

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (4)

  • IncrementalTestsVixen.Ui.Markup.Tests
  • SourceTextVixen.Core.Syntax
  • TextChangeTestsVixen.Core.Syntax.Tests
  • IncrementalParseTestsVixen.Raven.Tests