void Cursor::push(Inset & p)
{
push_back(CursorSlice(p));
+ p.setBuffer(bv_->buffer());
}
{
if (inMathed())
insert(MathAtom(inset));
- else
+ else {
text()->insertInset(*this, inset);
+ inset->setBuffer(bv_->buffer());
+ }
}
else
c = par.getChar(pos - 1);
string arg = to_utf8(cmd.argument());
- InsetQuotes * iq;
if (arg == "single")
- iq = new InsetQuotes(c, bufparams.quotes_language,
- InsetQuotes::SingleQ);
+ cur.insert(new InsetQuotes(c,
+ bufparams.quotes_language,
+ InsetQuotes::SingleQ));
else
- iq = new InsetQuotes(c, bufparams.quotes_language,
- InsetQuotes::DoubleQ);
- iq->setBuffer(bv->buffer());
- cur.insert(iq);
+ cur.insert(new InsetQuotes(c,
+ bufparams.quotes_language,
+ InsetQuotes::DoubleQ));
cur.posForward();
}
else