-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)
Index: lyx_main.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v
retrieving revision 1.181
diff -u -p -r1.181 lyx_main.C
--- lyx_main.C  14 Oct 2003 21:30:20 -0000      1.181
+++ lyx_main.C  12 Dec 2003 13:44:39 -0000
@@ -424,10 +424,6 @@ void LyX::defaultKeyBindings(kb_keymap  
        kbmap->bind("Delete", FuncRequest(LFUN_DELETE));
        kbmap->bind("BackSpace", FuncRequest(LFUN_BACKSPACE));
 
-       // sub- and superscript -MV
-       kbmap->bind("~S-underscore", FuncRequest(LFUN_SUBSCRIPT));
-       kbmap->bind("~S-asciicircum", FuncRequest(LFUN_SUPERSCRIPT));
-
        // kbmap->bindings to enable the use of the numeric keypad
        // e.g. Num Lock set
        //kbmap->bind("KP_0", FuncRequest(LFUN_SELFINSERT));
Index: lyxfunc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfunc.C,v
retrieving revision 1.550
diff -u -p -r1.550 lyxfunc.C
--- lyxfunc.C   10 Dec 2003 22:10:38 -0000      1.550
+++ lyxfunc.C   12 Dec 2003 13:44:39 -0000
@@ -1193,15 +1193,6 @@ void LyXFunc::dispatch(FuncRequest const
                        setErrorMessage(N_("This is only allowed in math mode!"));
                        break;
 
-               // passthrough hat and underscore outside mathed:
-               case LFUN_SUBSCRIPT:
-                       dispatch(FuncRequest(view(), LFUN_SELFINSERT, "_"));
-                       break;
-
-               case LFUN_SUPERSCRIPT:
-                       dispatch(FuncRequest(view(), LFUN_SELFINSERT, "^"));
-                       break;
-
                case LFUN_DIALOG_SHOW: {
                        string const name = func.getArg(0);
                        string data = trim(func.argument.substr(name.size()));
Index: insets/insetcommandparams.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcommandparams.h,v
retrieving revision 1.9
diff -u -p -r1.9 insetcommandparams.h
--- insets/insetcommandparams.h 6 Oct 2003 15:43:00 -0000       1.9
+++ insets/insetcommandparams.h 12 Dec 2003 13:44:39 -0000
@@ -66,11 +66,9 @@ private:
 
 
 ///
-bool operator==(InsetCommandParams const &,
-               InsetCommandParams const &);
+bool operator==(InsetCommandParams const &, InsetCommandParams const &);
 
 ///
-bool operator!=(InsetCommandParams const &,
-               InsetCommandParams const &);
+bool operator!=(InsetCommandParams const &, InsetCommandParams const &);
 
 #endif
Index: mathed/formulabase.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.314
diff -u -p -r1.314 formulabase.C
--- mathed/formulabase.C        22 Nov 2003 14:44:59 -0000      1.314
+++ mathed/formulabase.C        12 Dec 2003 13:44:39 -0000
@@ -604,16 +604,7 @@ InsetFormulaBase::priv_dispatch(FuncRequ
                break;
        }
 
-       case LFUN_SUPERSCRIPT:
-       case LFUN_SUBSCRIPT:
-       {
-               recordUndo(bv, Undo::ATOMIC);
-               mathcursor->script(cmd.action == LFUN_SUPERSCRIPT);
-               break;
-       }
-
-       case LFUN_MATH_DELIM:
-       {
+       case LFUN_MATH_DELIM: {
                //lyxerr << "formulabase::LFUN_MATH_DELIM, arg: '" << arg << "'" << 
endl;
                string ls;
                string rs = split(cmd.argument, ls, ' ');
Index: mathed/math_cursor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_cursor.C,v
retrieving revision 1.370
diff -u -p -r1.370 math_cursor.C
--- mathed/math_cursor.C        10 Dec 2003 10:22:27 -0000      1.370
+++ mathed/math_cursor.C        12 Dec 2003 13:44:39 -0000
@@ -1254,6 +1254,16 @@ bool MathCursor::interpret(char c)
                return pos() != size();
        }
 
+       if (c == '_') {
+               script(false);
+               return true;
+       }
+
+       if (c == '^') {
+               script(true);
+               return true;
+       }
+
        if (c == '{' || c == '}' || c == '#' || c == '&' || c == '$') {
                niceInsert(createMathInset(string(1, c)));
                return true;

Reply via email to