]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathNest.cpp
Fix bug #6033: Initial character sometimes eaten by math-insert
[features.git] / src / mathed / InsetMathNest.cpp
index c6e25b59945d0696f10b15e040631a79c724ae41..cb04af5a7c0c5a3405bda9cfddb017d8c728543b 100644 (file)
@@ -1131,8 +1131,9 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                else {
                        MathData ar;
                        asArray(cmd.argument(), ar);
-                       if (ar.size() == 1 && ar[0]->asNestInset()
-                                       && ar[0]->asNestInset()->nargs() > 1)
+                       if (cur.selection() && ar.size() == 1
+                           && ar[0]->asNestInset()
+                           && ar[0]->asNestInset()->nargs() > 1)
                                handleNest(cur, ar[0]);
                        else
                                cur.niceInsert(cmd.argument());