]> git.lyx.org Git - features.git/commitdiff
Do not output empty \item's or \commands with change tracking
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 26 Dec 2019 11:26:32 +0000 (12:26 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:49 +0000 (15:48 +0200)
unless "show in output" is selected.

Fixes #2861

src/output_latex.cpp

index db56ff608bb4391863fe33e04e262201120951ce..8a33d51dc403497728ec856376104dda614f215b 100644 (file)
@@ -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 << "'");