commit 70a762f91c6d43234a0290fd8d869937597feb9d
Author: Kornel Benko <[email protected]>
Date:   Thu May 5 15:56:15 2022 +0200

    FindAdv: Small improvements
---
 src/Paragraph.cpp |    2 +-
 src/lyxfind.cpp   |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index df1d905..e1ece12 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2619,7 +2619,7 @@ void Paragraph::latex(BufferParams const & bparams,
                                                runparams);
                                runningChange = Change(Change::UNCHANGED);
 
-                               os << (isEnvSeparator(i) ? "}]~" : "}] ");
+                               os << ((isEnvSeparator(i) && 
(runparams.for_search == OutputParams::NoSearch)) ? "}]~" : "}] ");
                                column +=3;
                        }
                        // For InTitle commands, we have already opened a group
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 1334805..c101e71 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -2826,6 +2826,8 @@ string Intervall::show(int lastpos)
        int idx = 0;                          /* int intervalls */
        string s;
        int i = 0;
+       if ((unsigned) lastpos > par.size())
+               lastpos = par.size();
        for (idx = 0; idx <= ignoreidx; idx++) {
                while (i < lastpos) {
                        int printsize;
@@ -3710,7 +3712,7 @@ MatchResult MatchStringAdv::findAux(DocIterator const & 
cur, int len, bool at_be
                mres.match_len = -1;
                return mres;
        }
-       LYXERR(Debug::FINDVERBOSE, "After normalization: Matching against:\n'" 
<< str << "'");
+       LYXERR(Debug::FINDVERBOSE|Debug::FIND, "After normalization: Matching 
against:\n'" << str << "'");
 
        LASSERT(use_regexp, /**/);
        {
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to