From: Michael Schmitt Date: Sat, 17 Feb 2007 15:43:11 +0000 (+0000) Subject: * src/output_plaintext.C: avoid empty line at the end of X-Git-Tag: 1.6.10~10780 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6d396fc1362e6c89328a0e49a502171a1351110c;p=features.git * src/output_plaintext.C: avoid empty line at the end of a paragraph if the previous line exceeds runparams.linelen git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17233 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/output_plaintext.C b/src/output_plaintext.C index 809db27eb0..6ccb342265 100644 --- a/src/output_plaintext.C +++ b/src/output_plaintext.C @@ -243,14 +243,18 @@ void writePlaintextParagraph(Buffer const & buf, } } - if (runparams.linelen > 0 && - currlinelen + word.length() > runparams.linelen) { - os << '\n'; - pair p = addDepth(depth, ltype_depth); - os << p.second; - currlinelen = p.first; + // currlinelen may be greater than runparams.linelen! + // => check whether word is empty and do nothing in this case + if (!word.empty()) { + if (runparams.linelen > 0 && + currlinelen + word.length() > runparams.linelen) { + os << '\n'; + pair p = addDepth(depth, ltype_depth); + os << p.second; + currlinelen = p.first; + } + os << word; } - os << word; }