From 395416e5241d8f865469441e2fa3ec0666fdb377 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 26 Dec 2019 12:26:32 +0100 Subject: [PATCH] Do not output empty \item's or \commands with change tracking unless "show in output" is selected. Fixes #2861 --- src/output_latex.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/output_latex.cpp b/src/output_latex.cpp index db56ff608b..8a33d51dc4 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -742,6 +742,12 @@ void TeXOnePar(Buffer const & buf, if (style.inpreamble && !force) return; + // Do not output empty commands if the whole paragraph has + // been deleted with ct and changes are not output. + if (!runparams_in.for_search && style.latextype != LATEX_ENVIRONMENT + && par.isDeleted(0, par.size()) && !bparams.output_changes) + return; + LYXERR(Debug::LATEX, "TeXOnePar for paragraph " << pit << " ptr " << &par << " '" << everypar << "'"); -- 2.39.5