if (cur.selection())
cutSelection(cur, true, false);
else
- deleteWordForward(cur);
+ deleteWordForward(cur, cmd.getArg(0) == "force");
finishChange(cur, false);
break;
if (cur.selection())
cutSelection(cur, true, false);
else
- deleteWordBackward(cur);
+ deleteWordBackward(cur, cmd.getArg(0) == "force");
finishChange(cur, false);
break;
if (cur.pos() == cur.paragraph().size())
// Par boundary, force full-screen update
singleParUpdate = false;
+ else if (cmd.getArg(0) != "force" && cur.confirmDeletion()) {
+ cur.resetAnchor();
+ cur.selection(true);
+ cur.posForward();
+ cur.setSelection();
+ break;
+ }
needsUpdate |= erase(cur);
cur.resetAnchor();
} else {
// Par boundary, full-screen update
if (par_boundary)
singleParUpdate = false;
+ else if (cmd.getArg(0) != "force" && cur.confirmDeletion(true)) {
+ cur.resetAnchor();
+ cur.selection(true);
+ cur.posBackward();
+ cur.setSelection();
+ break;
+ }
needsUpdate |= backspace(cur);
cur.resetAnchor();
if (par_boundary && !first_par && cur.pos() > 0
string const name = to_utf8(cmd.argument());
if (name == "hyphenation")
specialChar(cur, InsetSpecialChar::HYPHENATION);
+ else if (name == "allowbreak")
+ specialChar(cur, InsetSpecialChar::ALLOWBREAK);
else if (name == "ligature-break")
specialChar(cur, InsetSpecialChar::LIGATURE_BREAK);
else if (name == "slash")
}
case LFUN_HREF_INSERT: {
- // FIXME If we're actually given an argument, shouldn't
- // we use it, whether or not we have a selection?
docstring content = cmd.argument();
- if (cur.selection()) {
+ if (content.empty() && cur.selection())
content = cur.selectionAsString(false);
- cutSelection(cur, true, false);
- }
InsetCommandParams p(HYPERLINK_CODE);
if (!content.empty()){
break;
}
+ case LFUN_FONT_CROSSOUT: {
+ Font font(ignore_font, ignore_language);
+ font.fontInfo().setXout(FONT_TOGGLE);
+ toggleAndShow(cur, this, font);
+ break;
+ }
+
case LFUN_FONT_UNDERUNDERLINE: {
Font font(ignore_font, ignore_language);
font.fontInfo().setUuline(FONT_TOGGLE);
for (; pit <= lastpit; ++pit) {
if (pars_[pit].layout() != lay)
break;
- InsetList::const_iterator it = pars_[pit].insetList().begin();
- InsetList::const_iterator end = pars_[pit].insetList().end();
- for (; it != end; ++it) {
- if (it->inset->lyxCode() == ARG_CODE) {
- InsetArgument const * ins =
- static_cast<InsetArgument const *>(it->inset);
+ for (auto const & table : pars_[pit].insetList())
+ if (InsetArgument const * ins = table.inset->asInsetArgument())
if (ins->name() == arg) {
// we have this already
enable = false;
break;
}
- }
- }
}
} else
enable = false;
case LFUN_FONT_STATE:
case LFUN_FONT_UNDERLINE:
case LFUN_FONT_STRIKEOUT:
+ case LFUN_FONT_CROSSOUT:
case LFUN_FONT_UNDERUNDERLINE:
case LFUN_FONT_UNDERWAVE:
case LFUN_TEXTSTYLE_APPLY: