]> git.lyx.org Git - features.git/commitdiff
Amend 9be6a425, Workaround for advanced search in 'uncover'-inset.
authorKornel Benko <kornel@lyx.org>
Fri, 4 Nov 2022 14:34:49 +0000 (15:34 +0100)
committerKornel Benko <kornel@lyx.org>
Fri, 4 Nov 2022 14:34:49 +0000 (15:34 +0100)
Use getInset(i)->toString() instead of getInset(i)->plaintext()
if searching, so that we get the option of 'uncover' visible to the search engine.

src/Paragraph.cpp

index 4ce94415f796f23e1f83a60a378e1257d1d77145..3b3bc3913e715f10cc908d0243387d212aa1d457 100644 (file)
@@ -4256,7 +4256,10 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options, const Out
                else if (c == META_INSET && (options & AS_STR_INSETS)) {
                        if (c == META_INSET && (options & AS_STR_PLAINTEXT)) {
                                LASSERT(runparams != nullptr, return docstring());
-                               getInset(i)->plaintext(os, *runparams);
+                               if (runparams->find_effective())
+                                       getInset(i)->toString(os);
+                               else
+                                       getInset(i)->plaintext(os, *runparams);
                        } else if (c == META_INSET && (options & AS_STR_MATHED)
                                   && getInset(i)->lyxCode() == REF_CODE) {
                                Buffer const & buf = getInset(i)->buffer();