[LyX/master] FindAdv: Allow to search in LyX-Note also if ignoring format
Kornel Benko
kornel at lyx.org
Sun Apr 3 16:30:31 UTC 2022
commit 6e7fd68c798a8e5855f7e3a9ab6fd7014995f80d
Author: Kornel Benko <kornel at lyx.org>
Date: Sun Apr 3 19:03:47 2022 +0200
FindAdv: Allow to search in LyX-Note also if ignoring format
---
src/insets/InsetNote.cpp | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp
index d36b0d6..40194fa 100644
--- a/src/insets/InsetNote.cpp
+++ b/src/insets/InsetNote.cpp
@@ -251,7 +251,8 @@ 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)
+ if (params_.type == InsetNoteParams::Note
+ && (runparams_in.for_searchAdv & OutputParams::SearchNonOutput) == 0)
return 0;
OutputParams runparams(runparams_in);
@@ -260,9 +261,11 @@ int InsetNote::plaintext(odocstringstream & os,
// Ignore files that are exported inside a comment
runparams.exportdata.reset(new ExportData);
}
- os << '[' << buffer().B_("note") << ":\n";
+ if ((runparams_in.for_searchAdv & OutputParams::SearchNonOutput) == 0)
+ os << '[' << buffer().B_("note") << ":\n";
InsetText::plaintext(os, runparams, max_length);
- os << "\n]";
+ if ((runparams_in.for_searchAdv & OutputParams::SearchNonOutput) == 0)
+ os << "\n]";
return PLAINTEXT_NEWLINE + 1; // one char on a separate line
}
More information about the lyx-cvs
mailing list