]> git.lyx.org Git - features.git/commitdiff
accept coordinates up to a million...
authorAndré Pönitz <poenitz@gmx.net>
Sun, 17 Jul 2005 12:28:02 +0000 (12:28 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sun, 17 Jul 2005 12:28:02 +0000 (12:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10278 a592a061-630c-0410-9148-cb99ea01b6c8

src/coordcache.h
src/cursor.C

index 4fe2c006d1ad33e9d9f1f078cdfc86d3a9bb0e6c..9d92388f2177852149da5a5a22e247b1068865fd 100644 (file)
@@ -30,12 +30,13 @@ public:
                : x_(0), y_(0)
        {}
 
-       Point(int x, int y) : x_(x), y_(y)
+       Point(int x, int y)
+               : x_(x), y_(y)
        {
-               BOOST_ASSERT(x > -3000);
-               BOOST_ASSERT(x <  4000);
-               BOOST_ASSERT(y > -3000);
-               BOOST_ASSERT(y <  4000);
+               BOOST_ASSERT(x > -1000000);
+               BOOST_ASSERT(x <  1000000);
+               BOOST_ASSERT(y > -1000000);
+               BOOST_ASSERT(y <  1000000);
        }
 
        int x_, y_;
index e54cfe904f94bfe2fd1b9e524060c36de9987b47..0212621f350f0051545350774b4ec729da8b4b43 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "mathed/math_data.h"
 #include "mathed/math_inset.h"
+#include "mathed/math_scriptinset.h"
 #include "mathed/math_macrotable.h"
 
 #include "support/limited_stack.h"
@@ -915,10 +916,9 @@ bool LCursor::goUpDown(bool up)
                        MathScriptInset const * p = prevAtom()->asScriptInset();
                        if (p && p->has(up)) {
                                --pos();
-                               push(inset());
-                               idx() = up; // the superscript has index 1
+                               push(*const_cast<MathScriptInset*>(p));
+                               idx() = p->idxOfScript(up);
                                pos() = lastpos();
-                               //lyxerr << "updown: handled by scriptinset to the left" << endl;
                                return true;
                        }
                }
@@ -927,10 +927,9 @@ bool LCursor::goUpDown(bool up)
                if (pos() != lastpos()) {
                        MathScriptInset const * p = nextAtom()->asScriptInset();
                        if (p && p->has(up)) {
-                               push(inset());
-                               idx() = up;
+                               push(*const_cast<MathScriptInset*>(p));
+                               idx() = p->idxOfScript(up);
                                pos() = 0;
-                               //lyxerr << "updown: handled by scriptinset to the right" << endl;
                                return true;
                        }
                }