- no blank lines before environments (bug 4993).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25416
a592a061-630c-0410-9148-
cb99ea01b6c8
// Note from JMarc: we will re-add a \n explicitely in
// TeXEnvironment, because it is needed in this case
if (nextpit != paragraphs.end()) {
- os << '\n';
- texrow.newline();
+ Layout const & next_layout = nextpit->layout();
+ // no blank lines before environments!
+ if (!next_layout.isEnvironment() || style == next_layout) {
+ os << '\n';
+ texrow.newline();
+ }
}
if (nextpit != paragraphs.end())