#include "DispatchResult.h"
#include "Encoding.h"
#include "Font.h"
+#include "FuncCode.h"
#include "FuncRequest.h"
#include "Language.h"
-#include "lfuns.h"
#include "LyXFunc.h" // only for setMessage()
#include "LyXRC.h"
#include "paragraph_funcs.h"
void Cursor::recordUndoSelection()
{
- bv_->buffer().undo().recordUndo(*this, ATOMIC_UNDO,
- selBegin().pit(), selEnd().pit());
+ if (inMathed()) {
+ if (cap::multipleCellsSelected(*this))
+ recordUndoInset();
+ else
+ recordUndo();
+ } else
+ bv_->buffer().undo().recordUndo(*this, ATOMIC_UNDO,
+ selBegin().pit(), selEnd().pit());
}