* src/output_plaintext.C: fix line break handling;

don't stop 10 characters before max line length


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16782 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Michael Schmitt 2007-01-20 16:38:58 +00:00
parent 954f6feee7
commit 14102b6e99

View File

@ -215,7 +215,7 @@ void writePlaintextParagraph(Buffer const & buf,
case ' ':
if (runparams.linelen > 0 &&
currlinelen + word.length() > runparams.linelen - 10) {
currlinelen + word.length() > runparams.linelen) {
os << '\n';
pair<int, docstring> p = addDepth(depth, ltype_depth);
os << p.second;
@ -233,17 +233,17 @@ void writePlaintextParagraph(Buffer const & buf,
default:
word += c;
break;
}
}
if (runparams.linelen > 0 &&
currlinelen + word.length() > runparams.linelen)
{
currlinelen + word.length() > runparams.linelen) {
os << '\n';
pair<int, docstring> p = addDepth(depth, ltype_depth);
os << p.second;
currlinelen = p.first;
}
break;
}
}
os << word;
}