using cap::grabAndEraseSelection;
using cap::selClearOrDel;
using cap::pasteSimpleText;
+using frontend::Clipboard;
// globals...
static Font freefont(ignore_font, ignore_language);
bvcur.setMark(false);
switch (cmd.button()) {
case mouse_button::button1:
- // Set the cursor
- if (!bv->mouseSetCursor(cur, cmd.argument() == "region-select"))
- cur.screenUpdateFlags(Update::FitCursor);
+ if (!bvcur.selection())
+ // Set the cursor
+ bvcur.resetAnchor();
+ if (!bv->mouseSetCursor(cur, cmd.modifier() == ShiftModifier))
+ cur.screenUpdateFlags(Update::SinglePar | Update::FitCursor);
if (bvcur.wordSelection())
selectWord(bvcur, WHOLE_WORD);
break;
docstring layout = cmd.argument();
if (layout.empty())
layout = tclass.defaultLayoutName();
- enable = !cur.inset().forcePlainLayout() && tclass.hasLayout(layout);
+ enable = !owner_->forcePlainLayout() && tclass.hasLayout(layout);
flag.setOnOff(layout == cur.paragraph().layout().name());
break;
case LFUN_PARAGRAPH_PARAMS:
case LFUN_PARAGRAPH_PARAMS_APPLY:
case LFUN_PARAGRAPH_UPDATE:
- enable = cur.inset().allowParagraphCustomization();
+ enable = owner_->allowParagraphCustomization();
break;
// FIXME: why are accent lfuns forbidden with pass_thru layouts?