X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText3.cpp;h=f234c7cb7d027c95fd979b3cd281c0709092493a;hb=bed546d6f6aab7c32ef51d61edd120e18089da53;hp=30cc08d08568a973952a853672ce0a07f4e664e2;hpb=378c7e8edb4c1bfbcc1f0a0fffb9528969e1c05e;p=lyx.git diff --git a/src/Text3.cpp b/src/Text3.cpp index 30cc08d085..f234c7cb7d 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -2078,6 +2078,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) Layout::LaTeXArgMap::const_iterator const laend = args.end(); for (; lait != laend; ++lait) { Layout::latexarg arg = (*lait).second; + if (!inautoarg && arg.insertonnewline && cur.pos() > 0) { + FuncRequest cmd2(LFUN_PARAGRAPH_BREAK); + lyx::dispatch(cmd2); + } if (arg.autoinsert) { // The cursor might have been invalidated by the replaceSelection. cur.buffer()->changed(true); @@ -2087,6 +2091,10 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) cur.leaveInset(cur.inset()); cur.posForward(); inautoarg = false; + if (arg.insertonnewline && cur.pos() > 0) { + FuncRequest cmd2(LFUN_PARAGRAPH_BREAK); + lyx::dispatch(cmd2); + } } FuncRequest cmd2(LFUN_ARGUMENT_INSERT, (*lait).first); lyx::dispatch(cmd2);