mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
* 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:
parent
954f6feee7
commit
14102b6e99
@ -215,7 +215,7 @@ void writePlaintextParagraph(Buffer const & buf,
|
|||||||
|
|
||||||
case ' ':
|
case ' ':
|
||||||
if (runparams.linelen > 0 &&
|
if (runparams.linelen > 0 &&
|
||||||
currlinelen + word.length() > runparams.linelen - 10) {
|
currlinelen + word.length() > runparams.linelen) {
|
||||||
os << '\n';
|
os << '\n';
|
||||||
pair<int, docstring> p = addDepth(depth, ltype_depth);
|
pair<int, docstring> p = addDepth(depth, ltype_depth);
|
||||||
os << p.second;
|
os << p.second;
|
||||||
@ -233,17 +233,17 @@ void writePlaintextParagraph(Buffer const & buf,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
word += c;
|
word += c;
|
||||||
if (runparams.linelen > 0 &&
|
|
||||||
currlinelen + word.length() > runparams.linelen)
|
|
||||||
{
|
|
||||||
os << '\n';
|
|
||||||
pair<int, docstring> p = addDepth(depth, ltype_depth);
|
|
||||||
os << p.second;
|
|
||||||
currlinelen = p.first;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (runparams.linelen > 0 &&
|
||||||
|
currlinelen + word.length() > runparams.linelen) {
|
||||||
|
os << '\n';
|
||||||
|
pair<int, docstring> p = addDepth(depth, ltype_depth);
|
||||||
|
os << p.second;
|
||||||
|
currlinelen = p.first;
|
||||||
|
}
|
||||||
os << word;
|
os << word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user