bool forward = parse_bool(howto);
bool const found = ::find(bv, search,
- forward, casesensitive, matchword);
+ casesensitive, matchword, forward);
if (!found)
bv->owner()->message(_("String not found!"));
namespace {
-class MatchString
+class MatchString : public std::binary_function<Paragraph, lyx::pos_type, bool>
{
public:
MatchString(string const & str, bool cs, bool mw)
bool findChange(PosIterator & cur, PosIterator const & end)
{
for (; cur != end; ++cur) {
- if ((!cur.pit()->size() || !cur.at_end())
+ if ((cur.pit()->empty() || !cur.at_end())
&& cur.pit()->lookupChange(cur.pos()) != Change::UNCHANGED)
return true;
}
if (!searchAllowed(bv, searchstr) || buf.isReadonly())
return 0;
- recordUndo(Undo::ATOMIC, bv->text(), 0, buf.paragraphs().size() - 1);
+ recordUndoFullDocument(bv->cursor());
PosIterator cur = buf.pos_iterator_begin();
PosIterator const end = buf.pos_iterator_end();