]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.C
rename commandtags.h to lfuns.h and renumber/cleanup. Rebuild the tree !
[lyx.git] / src / mathed / math_scriptinset.C
index 9482caded57ff5e8907c692cceadf7c8dc047cfb..3892ba88328da383d71a7d4ec6411e56dfc5d699 100644 (file)
@@ -1,6 +1,3 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "math_scriptinset.h"
 #include "math_support.h"
@@ -332,15 +329,17 @@ bool MathScriptInset::idxUpDown(idx_type & idx, pos_type & pos, bool up,
 
        else {
                // in nucleus
-               // don't go up/down unless in last position
-               if (pos != cell(2).size())
-                       return false;
                // don't go up/down if there is no cell.
                if (!has(up))
                        return false;
-               // otherwise move into the first position
-               idx = up;
-               pos = 0;
+               // go up/down only if in the last position
+               // or in the first position of something with displayed limits
+               if (pos == cell(2).size() || (pos == 0 && hasLimits())) {
+                       idx = up;
+                       pos = 0;
+                       return true;
+               }
+               return false;
        }
        return true;
 }
@@ -400,7 +399,7 @@ void MathScriptInset::normalize(NormalStream & os) const
 }
 
 
-void MathScriptInset::maplize(MapleStream & os) const
+void MathScriptInset::maple(MapleStream & os) const
 {
        if (nuc().size())
                os << nuc();
@@ -411,7 +410,7 @@ void MathScriptInset::maplize(MapleStream & os) const
 }
 
 
-void MathScriptInset::mathematicize(MathematicaStream & os) const
+void MathScriptInset::mathematica(MathematicaStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -458,7 +457,7 @@ void MathScriptInset::mathmlize( MathMLStream & os) const
 }
 
 
-void MathScriptInset::octavize(OctaveStream & os) const
+void MathScriptInset::octave(OctaveStream & os) const
 {
        if (nuc().size())
                os << nuc();
@@ -494,7 +493,7 @@ void MathScriptInset::notifyCursorLeaves(idx_type idx)
 }
 
 
-MathInset::result_type MathScriptInset::dispatch
+dispatch_result MathScriptInset::dispatch
        (FuncRequest const & cmd, idx_type & idx, pos_type & pos)
 {
        if (cmd.action == LFUN_MATH_LIMITS) {