- /// Convenience: prepare undo for the single paragraph or cell
- /// containing the cursor
- void recordUndo(DocIterator const & cur, UndoKind kind = ATOMIC_UNDO);
- /// Convenience: prepare undo for the inset containing the cursor
- void recordUndoInset(DocIterator const & cur, UndoKind kind = ATOMIC_UNDO);
+ /// end the current undo group and set UndoElement::cur_after if necessary.
+ void endUndoGroup(CursorData const &);
+
+ /// The general case: record undo information for an arbitrary range.
+ /**
+ * Record undo information - call with the current cursor and
+ * the 'other end' of the range of changed paragraphs. So we
+ * give an inclusive range. This is called before you make the
+ * changes to the paragraph, and it will record the original
+ * information of the paragraphs in the undo stack.
+ * Kind of undo is always ATOMIC_UNDO.
+ */
+ void recordUndo(CursorData const & cur, pit_type from, pit_type to);
+
+ /// Convenience: record undo information for the single
+ /// paragraph or cell containing the cursor.
+ void recordUndo(CursorData const & cur, UndoKind kind = ATOMIC_UNDO);
+
+ /// Convenience: record undo for buffer parameters
+ void recordUndoBufferParams(CursorData const & cur);