public override void Redo(Gtk.TextBuffer buffer) { RemoveSplitTags(buffer); Gtk.TextIter idx_iter = buffer.GetIterAtOffset(index); buffer.InsertRange(ref idx_iter, chop.Start, chop.End); buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(index)); buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(index + chop.Length)); }
public override void Undo(Gtk.TextBuffer buffer) { int tag_images = GetSplitOffset(); Gtk.TextIter start_iter = buffer.GetIterAtOffset(start - tag_images); buffer.InsertRange(ref start_iter, chop.Start, chop.End); buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(is_forward ? start - tag_images : end - tag_images)); buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(is_forward ? end - tag_images : start - tag_images)); ApplySplitTags(buffer); }