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;
tm->setCursorFromCoordinates(cur, cmd.x(), y);
cur.setTargetX(cmd.x());
+ // Don't allow selecting a separator inset
+ if (cur.pos() && cur.paragraph().isEnvSeparator(cur.pos() - 1))
+ cur.posBackward();
if (cmd.y() >= wh)
lyx::dispatch(FuncRequest(LFUN_DOWN_SELECT));
else if (cmd.y() < 0)
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