commit e438c0f90b2d903fe8a42667c27f492756c3300a
Author: Richard Kimberly Heck <[email protected]>
Date:   Sat Jan 9 19:17:47 2021 -0500

    Fix bug #11010.
    
    Handle LFUN_PHANTOM_INSERT in math.
---
 src/mathed/InsetMathNest.cpp |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index abaeec9..8efa118 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -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;
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to