]> git.lyx.org Git - features.git/commitdiff
FindAdv: Amend 6e7fd68c: Handle InsetNoteParams::Comment too
authorKornel Benko <kornel@lyx.org>
Mon, 4 Apr 2022 08:46:55 +0000 (10:46 +0200)
committerKornel Benko <kornel@lyx.org>
Mon, 4 Apr 2022 08:46:55 +0000 (10:46 +0200)
src/insets/InsetNote.cpp

index 40194fa6ac1d49d6cb2dc78d86397029f6b91fd5..0324ca86fda497a146685f3c0ee13330a2718495 100644 (file)
@@ -251,12 +251,16 @@ void InsetNote::latex(otexstream & os, OutputParams const & runparams_in) const
 int InsetNote::plaintext(odocstringstream & os,
                         OutputParams const & runparams_in, size_t max_length) const
 {
-       if (params_.type == InsetNoteParams::Note
-           && (runparams_in.for_searchAdv & OutputParams::SearchNonOutput) == 0)
-               return 0;
+       if ((runparams_in.for_searchAdv & OutputParams::SearchNonOutput) == 0) {
+               if (params_.type == InsetNoteParams::Note)
+                       return 0;
+               else if (params_.type == InsetNoteParams::Comment
+                   && (runparams_in.for_searchAdv != OutputParams::NoSearch))
+                       return 0;
+       }
 
        OutputParams runparams(runparams_in);
-       if (params_.type == InsetNoteParams::Comment) {
+       if (params_.type != InsetNoteParams::Greyedout) {
                runparams.inComment = true;
                // Ignore files that are exported inside a comment
                runparams.exportdata.reset(new ExportData);