X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfind.cpp;h=6f6d0d53c937dcaa7905623b41a9c94237ce8396;hb=eea4ef9b6e8c103b8d77fb456214a116c68f58a7;hp=f4bf76b64f5da25b3ed1260f9e169e7a4a3f1e46;hpb=225de7830e1f02256b5f3fa2c629a362b8b828b8;p=lyx.git diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index f4bf76b64f..6f6d0d53c9 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -3030,9 +3030,9 @@ MatchResult MatchStringAdv::operator()(DocIterator const & cur, int len, bool at << ", inTexted=" << cur.inTexted()); if (res == 0 || !at_begin || !opt.matchword || !cur.inTexted()) return mres; - if ((len > 0) && (res < len)) { + if ((len > 0) && (res < len)) { mres.match_len = 0; - return mres; + return mres; } Paragraph const & par = cur.paragraph(); bool ws_left = (cur.pos() > 0) @@ -3044,18 +3044,18 @@ MatchResult MatchStringAdv::operator()(DocIterator const & cur, int len, bool at LYXERR(Debug::FIND, "cur.pos()=" << cur.pos() << ", res=" << res << ", separ: " << ws_left << ", " << ws_right - << ", len: " << len + << ", len: " << len << endl); if (ws_left && ws_right) { - // Check for word separators inside the found 'word' - for (int i = 0; i < len; i++) { - if (par.isWordSeparator(cur.pos() + i)) { + // Check for word separators inside the found 'word' + for (int i = 0; i < len; i++) { + if (par.isWordSeparator(cur.pos() + i)) { mres.match_len = 0; - return mres; + return mres; } - } - return mres; - } + } + return mres; + } mres.match_len = 0; return mres; } @@ -3417,9 +3417,9 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match) match_len_zero_count = 0; } else { - if (++match_len_zero_count > 3) { - LYXERR(Debug::FIND, "match_len2_zero_count: " << match_len_zero_count << ", match_len was " << match_len); - } + if (++match_len_zero_count > 3) { + LYXERR(Debug::FIND, "match_len2_zero_count: " << match_len_zero_count << ", match_len was " << match_len); + } break; } }