// 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 += "{}";
}
// 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
switch (act) {
// insert file functions
- case LFUN_LINE_DELETE:
+ case LFUN_LINE_DELETE_FORWARD:
cur.recordUndoInset();
//autocorrect_ = false;
//macroModeClose();
docstring & special = colinfo_[cur.col()].special_;
if (!special.empty()) {
docstring::size_type i = special.rfind('|');
- LASSERT(i != docstring::npos, /**/);
+ LASSERT(i != docstring::npos, break);
special.erase(i, 1);
}
}
docstring & special = colinfo_[cur.col()+1].special_;
if (!special.empty()) {
docstring::size_type i = special.find('|');
- LASSERT(i != docstring::npos, /**/);
+ LASSERT(i != docstring::npos, break);
special.erase(i, 1);
}
}
cap::replaceSelection(cur);
docstring topaste;
if (cmd.argument().empty() && !theClipboard().isInternal())
- topaste = theClipboard().getAsText();
+ topaste = theClipboard().getAsText(Clipboard::PlainTextType);
else {
idocstringstream is(cmd.argument());
int n = 0;
}
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);