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)
// 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;