[LyX/master] FindAdv: Amend 6e7fd68c: Handle InsetNoteParams::Comment too

Kornel Benko kornel at lyx.org
Mon Apr 4 08:11:49 UTC 2022


commit 681334ce20987beae57c55f9a1796b2eefd41944
Author: Kornel Benko <kornel at lyx.org>
Date:   Mon Apr 4 10:46:55 2022 +0200

    FindAdv: Amend 6e7fd68c: Handle InsetNoteParams::Comment too
---
 src/insets/InsetNote.cpp |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp
index 40194fa..0324ca8 100644
--- a/src/insets/InsetNote.cpp
+++ b/src/insets/InsetNote.cpp
@@ -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);


More information about the lyx-cvs mailing list