public override void Redo(Gtk.TextBuffer buffer) { RemoveSplitTags(buffer); Gtk.TextIter start_iter = buffer.GetIterAtOffset(start); Gtk.TextIter end_iter = buffer.GetIterAtOffset(end); buffer.Delete(ref start_iter, ref end_iter); buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(start)); buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(start)); }
public override void Undo(Gtk.TextBuffer buffer) { int tag_images = GetSplitOffset(); Gtk.TextIter start_iter = buffer.GetIterAtOffset(index - tag_images); Gtk.TextIter end_iter = buffer.GetIterAtOffset(index - tag_images + chop.Length); buffer.Delete(ref start_iter, ref end_iter); buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(index - tag_images)); buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(index - tag_images)); ApplySplitTags(buffer); }
public override void Undo(Gtk.TextBuffer buffer) { // Tag images change the offset by one, but only when deleting. Gtk.TextIter start_iter = buffer.GetIterAtOffset(Offset); Gtk.TextIter end_iter = buffer.GetIterAtOffset(Offset + chop.Length + 1); buffer.Delete(ref start_iter, ref end_iter); buffer.MoveMark(buffer.InsertMark, buffer.GetIterAtOffset(Offset)); buffer.MoveMark(buffer.SelectionBound, buffer.GetIterAtOffset(Offset)); Tag.WidgetLocation = null; ApplySplitTags(buffer); }
public void Erase() { Gtk.TextIter start_iter = Start; Gtk.TextIter end_iter = End; buffer.Delete(ref start_iter, ref end_iter); }