[LyX/master] Do not output empty \item's or \commands with change tracking

Juergen Spitzmueller spitz at lyx.org
Thu Dec 26 11:11:09 UTC 2019


commit d644ba0087329b4da6e37ca893236b510c5d15ed
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu Dec 26 12:26:32 2019 +0100

    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 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index db56ff6..8a33d51 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 << "'");
 


More information about the lyx-cvs mailing list