FindAdv: Handle latex-output for comment-environment

Disable if in search-adv modus and not searching in not-printed contents,
enable otherwise
This commit is contained in:
Kornel Benko 2022-04-01 20:14:47 +02:00
parent 83e65161a8
commit bcad19e504

View File

@ -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;