]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #11010.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 10 Jan 2021 00:17:47 +0000 (19:17 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 10 Jan 2021 00:17:47 +0000 (19:17 -0500)
Handle LFUN_PHANTOM_INSERT in math.

src/mathed/InsetMathNest.cpp

index abaeec903c6c882661ee21f1f9b6a0a2d65c62a5..8efa1181740653209fdd9757ec8c47895a223d42 100644 (file)
@@ -1295,6 +1295,24 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                return;
        }
 
+       case LFUN_PHANTOM_INSERT: {
+               docstring const & arg = cmd.argument();
+               docstring newarg;
+               if (arg == "Phantom")
+                       newarg = from_ascii("\\phantom");
+               else if (arg == "HPhantom")
+                       newarg = from_ascii("\\hphantom");
+               else if (arg == "VPhantom")
+                       newarg = from_ascii("\\vphantom");
+               if (newarg.empty())
+                       LYXERR0("Unknown phantom type " + newarg);
+               else {
+                       FuncRequest const newfunc(LFUN_MATH_INSERT, newarg);
+                       lyx::dispatch(newfunc);
+               }
+               break;
+       }
+
        default:
                InsetMath::doDispatch(cur, cmd);
                break;