Pavel Sanda <[EMAIL PROTECTED]> writes:
> sorry for this; when i was implementing graphics groups i have asked
> for the undo stuff and particularly that line you are refering now.
> finally i put there recordUndoFullDocument since the comments in
> undo.h were not clear to me and nobody replied.

I tried to replace it by a more 'surgical strike'-like approach
(although we know how precise these are...).

> great if you know how to get rid of this, i think we already have bugzilla
> entries about unusal memory consumption on big documents which are probably
> because of that.

Do you have pointers?

> btw i would be grateful if you can add some commentaries to undo.h,
> my question was how recordUndo should be used - the current
> commentary says 'prepare' undo as if something should be done to
> finish it and the commentary on finishUndo didn't help :)

What you just do is before action invoke recordUndo and tell it what
is the extent of paragraphs that you intend to have an action on. The
basic cur.recordUndo() remembers the paragraph that holds the cursor,
for example.

finishUndo is completely different, it is used for DELETE_UNDO and
INSET_UNDO (grouping of consecutive characters insertion/deletion).

JMarc

Reply via email to