]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathGrid.cpp
Fix regression of 5261ae6a2
[lyx.git] / src / mathed / InsetMathGrid.cpp
index ed77f71f851be12a46fa959b5b0f9c7e81d0defc..b4619de470a0f3d3baadf6565393e0774a521c7a 100644 (file)
@@ -674,7 +674,7 @@ docstring InsetMathGrid::eolString(row_type row, bool fragile,
        // make sure an upcoming '[' does not break anything
        if (row + 1 < nrows()) {
                MathData const & c = cell(index(row + 1, 0));
-               if (c.size() && c.front()->getChar() == '[')
+               if (!c.empty() && c.front()->getChar() == '[')
                        //eol += "[0pt]";
                        eol += "{}";
        }
@@ -905,7 +905,7 @@ bool InsetMathGrid::idxDelete(idx_type & idx)
 
        // try to delete entire sequence of ncols() empty cells if possible
        for (idx_type i = idx; i < idx + ncols(); ++i)
-               if (cell(i).size())
+               if (!cell(i).empty())
                        return false;
 
        // move cells if necessary
@@ -1343,7 +1343,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                }
                InsetMathGrid grid(buffer_, 1, 1);
                if (!topaste.empty())
-                       if ((topaste.size() == 1 && topaste.at(0) < 0x80)
+                       if ((topaste.size() == 1 && isAscii(topaste))
                            || !mathed_parse_normal(grid, topaste, parseflg)) {
                                resetGrid(grid);
                                mathed_parse_normal(grid, topaste, parseflg | Parse::VERBATIM);
@@ -1356,7 +1356,7 @@ void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
                        hline_enabled = status.enabled();
                if (grid.nargs() == 1) {
                        // single cell/part of cell
-                       cur.recordUndo();
+                       cur.recordUndoInset();
                        cur.cell().insert(cur.pos(), grid.cell(0));
                        cur.pos() += grid.cell(0).size();
                        if (hline_enabled)