mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
#6401 avoid unnecessary inset to string conversions in Paragraph::find while skipping invisible letters
This commit is contained in:
parent
5bce66b1a3
commit
012c0f6bac
@ -4307,9 +4307,12 @@ int Paragraph::find(docstring const & str, bool cs, bool mw,
|
|||||||
// Ignore "invisible" letters such as ligature breaks
|
// Ignore "invisible" letters such as ligature breaks
|
||||||
// and hyphenation chars while searching
|
// and hyphenation chars while searching
|
||||||
while (pos < parsize - 1 && isInset(pos)) {
|
while (pos < parsize - 1 && isInset(pos)) {
|
||||||
|
Inset const * inset = getInset(pos);
|
||||||
|
if (!inset->isLetter())
|
||||||
|
break;
|
||||||
odocstringstream os;
|
odocstringstream os;
|
||||||
getInset(pos)->toString(os);
|
inset->toString(os);
|
||||||
if (!getInset(pos)->isLetter() || !os.str().empty())
|
if (!os.str().empty())
|
||||||
break;
|
break;
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user