mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +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
|
||||
// and hyphenation chars while searching
|
||||
while (pos < parsize - 1 && isInset(pos)) {
|
||||
Inset const * inset = getInset(pos);
|
||||
if (!inset->isLetter())
|
||||
break;
|
||||
odocstringstream os;
|
||||
getInset(pos)->toString(os);
|
||||
if (!getInset(pos)->isLetter() || !os.str().empty())
|
||||
inset->toString(os);
|
||||
if (!os.str().empty())
|
||||
break;
|
||||
pos++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user