]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
John's Layout Tabular UI improvements and Martins fixes to clearing the
[lyx.git] / src / lyxfunc.C
index 302aa2d1eca76a20b87681358d57dbd0e69fae18..0456ef8bd14433fc78f9389885c5c0a5e0c7eacd 100644 (file)
@@ -559,8 +559,6 @@ func_status::value_type LyXFunc::getStatus(int ac,
        case LFUN_MATH_LIMITS: 
        case LFUN_MATH_NONUMBER: 
        case LFUN_MATH_NUMBER:
-       case LFUN_SUBSCRIPT:
-       case LFUN_SUPERSCRIPT:
                disable = !mathcursor;
                break;
 
@@ -932,7 +930,6 @@ string const LyXFunc::dispatch(int ac,
        case LFUN_ESCAPE:
        {
                if (!owner->view()->available()) break;
-               
                // this function should be used always [asierra060396]
                UpdatableInset * tli =
                        owner->view()->theLockingInset();
@@ -949,6 +946,7 @@ string const LyXFunc::dispatch(int ac,
                                                        lock,
                                                        true);
                        }
+                       finishUndo();
                }
        }
        break;
@@ -1436,13 +1434,19 @@ string const LyXFunc::dispatch(int ac,
        case LFUN_MATH_NUMBER:
        case LFUN_MATH_NONUMBER:
        case LFUN_MATH_LIMITS:
-       case LFUN_SUBSCRIPT:
-       case LFUN_SUPERSCRIPT:
        {
                setErrorMessage(N_("This is only allowed in math mode!"));
        }
        break;
 
+       // passthrough hat and underscore outside mathed:
+       case LFUN_SUBSCRIPT:
+               dispatch(LFUN_SELFINSERT, "_");
+               break;
+       case LFUN_SUPERSCRIPT:
+               dispatch(LFUN_SELFINSERT, "^");
+               break;
+
        case LFUN_MATH_PANEL:
                owner->getDialogs()->showMathPanel();
                break;