X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetText.cpp;h=e0cd894a4ae95ebe1ccf9cdedbe513e2caeac698;hb=a25569ebb3e739779ff458b287e403c3bf79777a;hp=609de704a1dae49f0d2b810d0a459c395950cbfd;hpb=8b00b355ca7012ca703c78a8be89193ac6435fcb;p=lyx.git diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 609de704a1..e0cd894a4a 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -251,7 +251,6 @@ void InsetText::edit(Cursor & cur, bool front, EntryDirection entry_from) } text_.setCursor(cur.top(), pit, pos); - cur.clearSelection(); cur.finishUndo(); } @@ -434,6 +433,8 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const // environment. Standard collapsable insets should not // redefine this, non-standard ones may call this. InsetLayout const & il = getLayout(); + if (il.forceOwnlines()) + os << breakln; if (!il.latexname().empty()) { if (il.latextype() == InsetLayout::COMMAND) { // FIXME UNICODE @@ -496,11 +497,13 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const os << breakln; else os << safebreakln; - os << "\\end{" << from_utf8(il.latexname()) << "}\n"; + os << "\\end{" << from_utf8(il.latexname()) << "}" << breakln; if (!il.isDisplay()) os.protectSpace(true); } } + if (il.forceOwnlines()) + os << breakln; }