X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText2.cpp;h=07839a748d016e4d6609a9354bd41e014aecd424;hb=66c5d055e776e0cd08fb35c164b49d9ccc7812b7;hp=b917dba2122d2c02f9d1b32129f45fc08daffb64;hpb=386a347484669d9b498699c7cc42be400ad8ba81;p=lyx.git diff --git a/src/Text2.cpp b/src/Text2.cpp index b917dba212..07839a748d 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -186,6 +186,8 @@ void Text::setLayout(pit_type start, pit_type end, if (lyxlayout.margintype == MARGIN_MANUAL) par.setLabelWidthString(par.expandLabel(lyxlayout, bp)); } + + deleteEmptyParagraphMechanism(start, end - 1, bp.track_changes); } @@ -198,6 +200,7 @@ void Text::setLayout(Cursor & cur, docstring const & layout) pit_type end = cur.selEnd().pit() + 1; cur.recordUndoSelection(); setLayout(start, end, layout); + cur.fixIfBroken(); cur.setCurrentFont(); cur.forceBufferUpdate(); } @@ -480,7 +483,7 @@ void Text::setLabelWidthStringToSequence(Cursor const & cur, } -void Text::setParagraphs(Cursor & cur, docstring arg, bool merge) +void Text::setParagraphs(Cursor & cur, docstring const & arg, bool merge) { LBUFERR(cur.text());