mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Fix line count off-by-one for single-par verbatims
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21293 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bc86ac1804
commit
af84c0957d
@ -254,15 +254,18 @@ TeXOnePar(Buffer const & buf,
|
|||||||
LayoutPtr style;
|
LayoutPtr style;
|
||||||
|
|
||||||
if (runparams_in.verbatim) {
|
if (runparams_in.verbatim) {
|
||||||
Font const outerfont =
|
int dist = std::distance(paragraphs.begin(), pit);
|
||||||
outerFont(std::distance(paragraphs.begin(), pit),
|
Font const outerfont = outerFont(dist, paragraphs);
|
||||||
paragraphs);
|
|
||||||
|
// No newline if only one paragraph in this lyxtext
|
||||||
|
if (dist > 0) {
|
||||||
|
os << '\n';
|
||||||
|
texrow.newline();
|
||||||
|
}
|
||||||
|
|
||||||
/*bool need_par = */ pit->latex(buf, bparams, outerfont,
|
/*bool need_par = */ pit->latex(buf, bparams, outerfont,
|
||||||
os, texrow, runparams_in);
|
os, texrow, runparams_in);
|
||||||
|
|
||||||
os << '\n';
|
|
||||||
texrow.newline();
|
|
||||||
return ++pit;
|
return ++pit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user