]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_rootinset.C
mathed uglyfication
[lyx.git] / src / mathed / math_rootinset.C
index bba8ddfbb191b48994f82a7cb5e182e347bc9567..6d9513a5bbac0a076fe0cbeb7c1d91f701246c8f 100644 (file)
@@ -14,6 +14,7 @@
 #include "math_rootinset.h"
 #include "math_data.h"
 #include "math_mathmlstream.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 
@@ -77,13 +78,14 @@ void MathRootInset::normalize(NormalStream & os) const
 }
 
 
-bool MathRootInset::idxUpDown(idx_type & idx, pos_type & pos, bool up, int) const
+bool MathRootInset::idxUpDown(BufferView & bv, bool up, int) const
 {
+       CursorSlice & cur = cursorTip(bv);
        bool target = !up; // up ? 0 : 1;
-       if (idx == target)
+       if (cur.idx() == target)
                return false;
-       idx = target;
-       pos = target ? 0 : cell(0).size();
+       cur.idx() = target;
+       cur.pos() = up ? cur.lastpos() : 0;
        return true;
 }