]> git.lyx.org Git - features.git/commitdiff
Correctly show merged paragraphs with ct in plain text output
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 27 Dec 2019 08:01:06 +0000 (09:01 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:49 +0000 (15:48 +0200)
Fixes #3137

src/output_plaintext.cpp

index 8c5655d39b6e315b7ab85743cbb94f67ae9b5ea5..9dae951f03915a0f9e2f14751e572d95014d9a1d 100644 (file)
@@ -56,9 +56,11 @@ void writePlaintextFile(Buffer const & buf, odocstream & os,
        ParagraphList::const_iterator end = par.end();
        ParagraphList::const_iterator it = beg;
        for (; it != end; ++it) {
+               bool const merged_par = (*it).parEndChange().deleted();
                writePlaintextParagraph(buf, *it, os, runparams, ref_printed);
-               os << "\n";
-               if (runparams.linelen > 0)
+               if (!merged_par)
+                       os << "\n";
+               if (runparams.linelen > 0 && !merged_par)
                        os << "\n";
        }
 }