// Try and generate a valid index entry.
InsetCommandParams icp("index");
string const contents = cmd.argument.empty() ?
- bv->getLyXText()->getStringToIndex() :
+ bv->getLyXText()->getStringToIndex(bv->cursor()) :
cmd.argument;
icp.setContents(contents);
return 0;
case LFUN_INSET_CAPTION: {
- UpdatableInset * up = bv->cursor().inset()
- ? bv->cursor().inset()->asUpdatableInset() : 0;
+ UpdatableInset * up = bv->cursor().inset().asUpdatableInset();
if (!up) {
auto_ptr<InsetCaption> inset(new InsetCaption(params));
- inset->setOwner(up);
inset->setAutoBreakRows(true);
inset->setDrawFrame(InsetText::LOCKED);
inset->setFrameColor(LColor::captionframe);