]> git.lyx.org Git - features.git/commitdiff
Martin's patches, part I
authorAndré Pönitz <poenitz@gmx.net>
Thu, 3 Jan 2002 16:16:39 +0000 (16:16 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 3 Jan 2002 16:16:39 +0000 (16:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3289 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxfunc.C

index 9e2311594fe4c51d5a554abfdc827a549d641c99..1551469e02746a6b937f6db612e88b3dd950d79f 100644 (file)
@@ -1,3 +1,22 @@
+2002-01-03     Martin Vermeer <martin.vermeer@hut.fi>
+
+       * FormMathsPanel.C:
+       * FormMathsPanel.h
+       * MathsSymbols.C:
+       * form_maths_panel.C:
+       * form_maths_panel.h:
+       * form_maths_panel.fd:
+       implemented sub- and super- buttons in math panel.
+
+       * lyx_main.C:
+       Revised hardwired bindings to allow original _ and ^ (or ^ space)
+       to be used as in TeX (req'd byAndré).
+
+       * lyxfunc.C:
+       Allow ^and _ again to be used both as super/subscript (mathed)
+       and as themselves (in text).
+
+
 2002-01-03  Allan Rae  <rae@lyx.org>
 
        * LyXView.C (updateWindowTitle): Setup a short icon title of either
index 302aa2d1eca76a20b87681358d57dbd0e69fae18..34eaec042ea2ab6c60c6e66e289f2019c2e8b25d 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;
 
@@ -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;