]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Add quote style information to languages
[lyx.git] / src / lyxfind.cpp
index b67f915d7c815d75f6fed65f7861d9f68f0e7437..73f6469754fe43b3ca2e903e6c893fac52491622 100644 (file)
@@ -271,7 +271,7 @@ pair<bool, int> replaceOne(BufferView * bv, docstring searchstr,
        if (bv->buffer().isReadonly())
                return pair<bool, int>(false, 0);
 
-       cap::replaceSelectionWithString(cur, replacestr, forward);
+       cap::replaceSelectionWithString(cur, replacestr);
        if (forward) {
                cur.pos() += replacestr.length();
                LASSERT(cur.pos() <= cur.lastpos(), /* */);
@@ -1133,12 +1133,12 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
 {
        if (!cur)
                return 0;
-       while (cur) {
+       while (!theApp()->longOperationCancelled() && cur) {
                LYXERR(Debug::FIND, "findForwardAdv() cur: " << cur);
                int match_len = match(cur, -1, false);
                LYXERR(Debug::FIND, "match_len: " << match_len);
                if (match_len) {
-                       for (; cur; cur.forwardPos()) {
+                       for (; !theApp()->longOperationCancelled() && cur; cur.forwardPos()) {
                                LYXERR(Debug::FIND, "Advancing cur: " << cur);
                                int match_len = match(cur);
                                LYXERR(Debug::FIND, "match_len: " << match_len);
@@ -1235,7 +1235,7 @@ int findBackwardsAdv(DocIterator & cur, MatchStringAdv & match) {
                else
                        cur.backwardPos();
                pit_changed = true;
-       } while (true);
+       } while (!theApp()->longOperationCancelled());
        return 0;
 }