* paragraph and the inset allows setting layout
* FIXME: this does not work as expected when change tracking is on
* However, we do not really know what to do in this case.
+ * FIXME: figure out a good test in the environment case (see #12251).
*/
- if (cur.paragraph().empty() && !inset->forcePlainLayout()) {
+ if (cur.paragraph().layout().isCommand()
+ && cur.paragraph().empty()
+ && !inset->forcePlainLayout()) {
cur.paragraph().setPlainOrDefaultLayout(bparams.documentClass());
move_layout = true;
}
pasteFromStack(cur, bv->buffer().errorList("Paste"), 0);
else if (theClipboard().hasTextContents()) {
if (pasteClipboardText(cur, bv->buffer().errorList("Paste"),
- true, Clipboard::AnyTextType))
+ !cur.paragraph().parbreakIsNewline(),
+ Clipboard::AnyTextType))
tryGraphics = false;
}
if (tryGraphics && theClipboard().hasGraphicsContents())
bv->buffer().params().spellignore().push_back(wl);
cur.recordUndo();
// trigger re-check of whole buffer
- ParagraphList & pars = bv->buffer().paragraphs();
- ParagraphList::iterator pit = pars.begin();
- ParagraphList::iterator pend = pars.end();
- for (; pit != pend; ++pit)
- pit->requestSpellCheck();
+ bv->buffer().requestSpellcheck();
}
break;
}
bv->buffer().params().spellignore().erase(it);
cur.recordUndo();
// trigger re-check of whole buffer
- ParagraphList & pars = bv->buffer().paragraphs();
- ParagraphList::iterator pit = pars.begin();
- ParagraphList::iterator pend = pars.end();
- for (; pit != pend; ++pit)
- pit->requestSpellCheck();
+ bv->buffer().requestSpellcheck();
}
break;
}
break;
case LFUN_PRIMARY_SELECTION_PASTE:
+ status.setUnknown(!theSelection().supported());
enable = cur.selection() || !theSelection().empty();
break;