]> git.lyx.org Git - lyx.git/blobdiff - src/Cursor.cpp
Allow using \binom without amsmath and add support for \brace and \brack
[lyx.git] / src / Cursor.cpp
index 656fc7417cf2d62b852869c85bb84a96c7915bf9..b0997ecbba12047eef5dac3ce3ad5cd55d7c526b 100644 (file)
@@ -23,9 +23,9 @@
 #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"
@@ -1949,8 +1949,14 @@ void Cursor::recordUndoFullDocument()
 
 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());
 }