X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_plaintext.cpp;h=9dae951f03915a0f9e2f14751e572d95014d9a1d;hb=dab71087cf2954b77d3d2c0e67b868f9be82fba9;hp=2dfc836f1aceb4906cbc596e532cb63bcbdc65dd;hpb=ecef54500d4d77baf4fa47eac2253679875ac08c;p=lyx.git diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index 2dfc836f1a..9dae951f03 100644 --- a/src/output_plaintext.cpp +++ b/src/output_plaintext.cpp @@ -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"; } } @@ -188,7 +190,7 @@ void writePlaintextParagraph(Buffer const & buf, if (os.str().size() > max_length) break; - char_type c = par.getUChar(buf.params(), i); + char_type c = par.getUChar(buf.params(), runparams, i); if (par.isInset(i) || c == ' ') { if (runparams.linelen > 0 && @@ -217,7 +219,7 @@ void writePlaintextParagraph(Buffer const & buf, switch (c) { case ' ': os << ' '; - currlinelen++; + ++currlinelen; break; case '\0':