]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathGrid.C
This commit saves the need to check for lyx::use_gui in a number of places.
[lyx.git] / src / mathed / InsetMathGrid.C
index 06b53ae5c45a52ce7eab45ed5f7f962ae0fbca6b..63d96f6a3ef8833ca1f9fab8801a7d3a786dfc46 100644 (file)
@@ -784,7 +784,7 @@ bool InsetMathGrid::idxUpDown(LCursor & cur, bool up) const
                        return false;
                cur.idx() += ncols();
        }
-       cur.pos() = cur.cell().x2pos(cur.x_target() - cur.cell().xo());
+       cur.pos() = cur.cell().x2pos(cur.x_target() - cur.cell().xo(cur.bv()));
        return true;
 }
 
@@ -1210,7 +1210,9 @@ void InsetMathGrid::doDispatch(LCursor & cur, FuncRequest & cmd)
                int n = 0;
                is >> n;
                InsetMathGrid grid(1, 1);
-               mathed_parse_normal(grid, lyx::cap::getSelection(cur.buffer(), n));
+               // FIXME UNICODE
+               mathed_parse_normal(grid,
+                       lyx::to_utf8(lyx::cap::getSelection(cur.buffer(), n)));
                if (grid.nargs() == 1) {
                        // single cell/part of cell
                        recordUndo(cur);