redostack.clear();
//lyxerr << "undostack:\n";
//for (size_t i = 0, n = buf.undostack().size(); i != n && i < 6; ++i)
redostack.clear();
//lyxerr << "undostack:\n";
//for (size_t i = 0, n = buf.undostack().size(); i != n && i < 6; ++i)
undo.isFullBuffer, !isUndoOperation);
// This does the actual undo/redo.
undo.isFullBuffer, !isUndoOperation);
// This does the actual undo/redo.
// This is a full document
otherstack.top().bparams = buffer_.params();
buffer_.params() = undo.bparams;
// This is a full document
otherstack.top().bparams = buffer_.params();
buffer_.params() = undo.bparams;
delete undo.pars;
undo.pars = 0;
} else if (dit.inMathed()) {
// We stored the full cell here as there is not much to be
// gained by storing just 'a few' paragraphs (most if not
// all math inset cells have just one paragraph!)
delete undo.pars;
undo.pars = 0;
} else if (dit.inMathed()) {
// We stored the full cell here as there is not much to be
// gained by storing just 'a few' paragraphs (most if not
// all math inset cells have just one paragraph!)