]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Replace Q_WS_WIN with appropriate guards to account for Qt5.
[lyx.git] / src / lyxfind.cpp
index 1b32ae37c780b558778f7443bcbbb726641296ac..6b9556e8790e92fe3d2a4f87202cfce0d99927c7 100644 (file)
@@ -400,7 +400,7 @@ bool findChange(DocIterator & cur, bool next)
                        if (!next)
                                // if we search backwards, take a step forward
                                // to correctly set the anchor
-                               cur.forwardPos();
+                               cur.top().forwardPos();
                        return true;
                }
 
@@ -787,11 +787,11 @@ static docstring stringifySearchBuffer(Buffer & buffer, FindAndReplaceOptions co
                        Paragraph const & par = buffer.paragraphs().at(pit);
                        LYXERR(Debug::FIND, "Adding to search string: '"
                               << par.asString(pos_type(0), par.size(),
-                                              AS_STR_INSETS | AS_STR_PLAINTEXT,
+                                              AS_STR_INSETS | AS_STR_SKIPDELETE | AS_STR_PLAINTEXT,
                                               &runparams)
                               << "'");
                        str += par.asString(pos_type(0), par.size(),
-                                           AS_STR_INSETS | AS_STR_PLAINTEXT,
+                                           AS_STR_INSETS | AS_STR_SKIPDELETE | AS_STR_PLAINTEXT,
                                            &runparams);
                }
        }
@@ -1044,7 +1044,7 @@ docstring stringifyFromCursor(DocIterator const & cur, int len)
                LYXERR(Debug::FIND, "Stringifying with cur: "
                       << cur << ", from pos: " << cur.pos() << ", end: " << end);
                return par.asString(cur.pos(), end,
-                       AS_STR_INSETS | AS_STR_PLAINTEXT,
+                       AS_STR_INSETS | AS_STR_SKIPDELETE | AS_STR_PLAINTEXT,
                        &runparams);
        } else if (cur.inMathed()) {
                docstring s;