]> git.lyx.org Git - features.git/commitdiff
fix enering of \_
authorAndré Pönitz <poenitz@gmx.net>
Thu, 18 Apr 2002 15:29:27 +0000 (15:29 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 18 Apr 2002 15:29:27 +0000 (15:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4027 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C
src/mathed/math_cursor.C

index de98c76ae9b3976973134f0894ba7c36014e72d1..bf01e56f3b809c906f3d5f6177e8170057a926c5 100644 (file)
@@ -614,7 +614,7 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
        case LFUN_SUBSCRIPT:
        {
                bv->lockedInsetStoreUndo(Undo::EDIT);
-               mathcursor->script((action == LFUN_SUPERSCRIPT));
+               mathcursor->script(action == LFUN_SUPERSCRIPT);
                updateLocal(bv, true);
                break;
        }
index 89fd224f7f57b1b2d3d3dc09e20756ed49c37d60..23c686e48f190a71447acdabd9dc69e8fbc4efe8 100644 (file)
@@ -1390,6 +1390,15 @@ bool MathCursor::interpret(string const & s)
 
 bool MathCursor::script(bool up)
 {
+       // Hack to get \\^ and \\_ working
+       if (inMacroMode() && macroName() == "\\") {
+               if (up)
+                       interpret("\\mathcircumflex");
+               else
+                       interpret('_');
+               return true;
+       }
+
        macroModeClose();
        selCut();
        if (hasPrevAtom() && prevAtom()->asScriptInset()) {