[LyX/master] FindAdv: Handle latex-output for comment-environment
Kornel Benko
kornel at lyx.org
Fri Apr 1 17:38:53 UTC 2022
commit bcad19e504f845f8fe08d4d62b46e0fdbc67145e
Author: Kornel Benko <kornel at lyx.org>
Date: Fri Apr 1 20:14:47 2022 +0200
FindAdv: Handle latex-output for comment-environment
Disable if in search-adv modus and not searching in not-printed contents,
enable otherwise
---
src/insets/InsetText.cpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index a452184..af1847c 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -485,6 +485,13 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
// environment. Standard collapsible insets should not
// redefine this, non-standard ones may call this.
InsetLayout const & il = getLayout();
+ if (runparams.for_searchAdv != OutputParams::NoSearch &&
+ (runparams.for_searchAdv & OutputParams::SearchNonOutput) == 0 &&
+ !il.latexname().empty() &&
+ il.latextype() == InsetLaTeXType::ENVIRONMENT &&
+ il.latexname() == "comment")
+ return;
+
if (il.forceOwnlines())
os << breakln;
bool needendgroup = false;
More information about the lyx-cvs
mailing list