mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
FindAdv: Correct start of search if not using regex
Do not try to find pattern inside the leading string.
This commit is contained in:
parent
85b36769cb
commit
9a1a806b60
@ -2923,7 +2923,8 @@ MatchResult MatchStringAdv::findAux(DocIterator const & cur, int len, bool at_be
|
||||
return mres;
|
||||
}
|
||||
} else {
|
||||
size_t pos = str.find(par_as_string_nolead);
|
||||
// Start the search _after_ the leading part
|
||||
size_t pos = str.find(par_as_string_nolead, lead_as_string.size());
|
||||
if (pos != string::npos) {
|
||||
mres.match_len = par_as_string.size();
|
||||
mres.match2end = str.size() - pos;
|
||||
|
Loading…
Reference in New Issue
Block a user