public Insert ( int offset, ITextSource text ) : void | ||
offset | int | The offset at which the text is inserted. |
text | ITextSource | The new text. |
return | void |
public void Insert(int offset, ITextSource text)
{
Replace(offset, 0, text, null);
}
public void ContinueUndoGroup() { var doc = new TextDocument(); doc.Insert(0, "a"); doc.UndoStack.StartContinuedUndoGroup(); doc.Insert(1, "b"); doc.UndoStack.EndUndoGroup(); doc.UndoStack.Undo(); Assert.AreEqual("", doc.Text); }