From 1d613827c60375c4adb025f392424be6e233fc6f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 20 Jan 2021 07:38:33 +0100 Subject: [PATCH] Do not output tracked deleted paragraph break in listings (#10418) --- src/insets/InsetListings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp index 51763d40af..471605a28c 100644 --- a/src/insets/InsetListings.cpp +++ b/src/insets/InsetListings.cpp @@ -312,9 +312,11 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const } } ++par; - // for the inline case, if there are multiple paragraphs + // Add new line for displayed listing between paragraphs. + // Exception: merged paragraphs in change tracking mode. + // Also, ´for the inline case, if there are multiple paragraphs // they are simply joined. Otherwise, expect latex errors. - if (par != end && !isInline && !captionline) + if (par != end && !isInline && !captionline && !par->parEndChange().deleted()) code += "\n"; } if (isInline) { -- 2.39.5