FindAdv: Small improvements

This commit is contained in:
Kornel Benko 2022-05-05 15:56:15 +02:00
parent 809a063358
commit 70a762f91c
2 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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, /**/);
{