X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText3.cpp;h=15ffb2881f6b4cee7b6449363ec49e53b101618a;hb=fd3a41e035a44a66a3adcb9fa0f970f32e9d260c;hp=ca6ec5bc29279d7fce3c2ed7d7b8bcf407b16eee;hpb=c8aaaff15a036176f861d7b0ce6053acfd7ce80b;p=lyx.git diff --git a/src/Text3.cpp b/src/Text3.cpp index ca6ec5bc29..15ffb2881f 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -370,7 +370,7 @@ static void outline(OutlineOp mode, Cursor & cur) ParagraphList & pars = buf.text().paragraphs(); ParagraphList::iterator const bgn = pars.begin(); // The first paragraph of the area to be copied: - ParagraphList::iterator start = next(bgn, pit); + ParagraphList::iterator start = lyx::next(bgn, pit); // The final paragraph of area to be copied: ParagraphList::iterator finish = start; ParagraphList::iterator const end = pars.end(); @@ -808,7 +808,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) ParagraphList & pars = buf.text().paragraphs(); ParagraphList::iterator bgn = pars.begin(); // The first paragraph of the area to be selected: - ParagraphList::iterator start = next(bgn, pit); + ParagraphList::iterator start = lyx::next(bgn, pit); // The final paragraph of area to be selected: ParagraphList::iterator finish = start; ParagraphList::iterator end = pars.end(); @@ -1048,22 +1048,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CHAR_DELETE_FORWARD: if (!cur.selection()) { - bool was_separator = cur.paragraph().isEnvSeparator(cur.pos()); if (cur.pos() == cur.paragraph().size()) // Par boundary, force full-screen update singleParUpdate = false; needsUpdate |= erase(cur); cur.resetAnchor(); - if (was_separator && cur.pos() == cur.paragraph().size() - && (!cur.paragraph().layout().isEnvironment() - || cur.paragraph().size() > 0)) { - // Force full-screen update - singleParUpdate = false; - needsUpdate |= erase(cur); - cur.resetAnchor(); - } - // It is possible to make it a lot faster still - // just comment out the line below... } else { cutSelection(cur, true, false); singleParUpdate = false; @@ -1107,23 +1096,21 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) prev = pit - 1; } if (prev < pit && cur.pos() == par.beginOfBody() - && !par.isEnvSeparator(par.size() ? par.size() - 1 : 0) + && !par.size() && !par.isEnvSeparator(cur.pos()) && !par.layout().isCommand() && pars_[prev].layout() != par.layout() && pars_[prev].layout().isEnvironment() - && (!nextpar.isEnvSeparator(nextpar.size() ? nextpar.size() - 1 : 0) - || nextpar.layout().isCommand() - || nextpar.layout().isEnvironment())) { + && !nextpar.isEnvSeparator(nextpar.beginOfBody())) { if (par.layout().isEnvironment() && pars_[prev].getDepth() == par.getDepth()) { docstring const layout = par.layout().name(); DocumentClass const & tc = bv->buffer().params().documentClass(); lyx::dispatch(FuncRequest(LFUN_LAYOUT, tc.plainLayout().name())); - lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak")); + lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "plain")); lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse")); lyx::dispatch(FuncRequest(LFUN_LAYOUT, layout)); } else { - lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak")); + lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "plain")); breakParagraph(cur); } Font const f(inherit_font, cur.current_font.language()); @@ -2731,7 +2718,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_CAPTION_INSERT: { code = CAPTION_CODE; string arg = cmd.getArg(0); - bool varia = arg != "LongTableNoNumber" + bool varia = arg != "Unnumbered" && cur.inset().allowsCaptionVariation(arg); // not allowed in description items, // and in specific insets