FindQuick: Handle quotes special (as in findadv)

This commit is contained in:
Kornel Benko 2022-04-09 08:52:24 +02:00
parent 801768af92
commit 4bd38d8a09
2 changed files with 9 additions and 1 deletions

View File

@ -429,6 +429,7 @@ public:
NoSearch = 0,
SearchWithDeleted = 1,
SearchWithoutDeleted = 2,
SearchQuick = 4,
SearchNonOutput = 8
};

View File

@ -4610,7 +4610,14 @@ int Paragraph::find(docstring const & str, bool cs, bool mw,
if (!inset->isLetter() && !inset->isChar())
break;
odocstringstream os;
inset->toString(os);
if (inset->lyxCode() == lyx::QUOTE_CODE) {
OutputParams op(0);
op.for_searchAdv = OutputParams::SearchQuick;
inset->plaintext(os, op);
}
else {
inset->toString(os);
}
docstring const insetstring = os.str();
if (!insetstring.empty()) {
int const insetstringsize = insetstring.length();