From: Juergen Spitzmueller Date: Sat, 13 Jan 2018 14:12:10 +0000 (+0100) Subject: Work around auto-bibitem insertion when separating bibliography environment X-Git-Tag: lyx-2.4.0dev-acb2ca7b~4024 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e57b245d0bbd2cc3bb5021518cbfce30a27475be;p=features.git Work around auto-bibitem insertion when separating bibliography environment Manually delete bibitem insets in the separator line. In the long term, such things should not happen at all. Candidate for 2.3.x. --- diff --git a/src/Text3.cpp b/src/Text3.cpp index b339e07875..b8232e24d2 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1644,6 +1644,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) DocumentClass const & tc = bv->buffer().params().documentClass(); lyx::dispatch(FuncRequest(LFUN_LAYOUT, from_ascii("\"") + tc.plainLayout().name() + from_ascii("\" ignoreautonests"))); + // FIXME: Bibitem mess! + if (cur.prevInset() && cur.prevInset()->lyxCode() == BIBITEM_CODE) + lyx::dispatch(FuncRequest(LFUN_CHAR_DELETE_BACKWARD)); lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "plain")); if (before) { cur.backwardPos();