void LyXText::gotoInset(vector<Inset::Code> const & codes,
- bool same_content)
+ bool same_content)
{
bv()->hideCursor();
bv()->beforeChange(this);
update();
string contents;
- if (same_content && cursor.par()->isInset(cursor.pos())) {
+ if (same_content && cursor.pos() < cursor.par()->size()
+ && cursor.par()->isInset(cursor.pos())) {
Inset const * inset = cursor.par()->getInset(cursor.pos());
if (find(codes.begin(), codes.end(), inset->lyxCode())
!= codes.end())
for (; tmp != end; ++tmp) {
if (tmp->params().startOfAppendix()) {
- setUndo(bv, Undo::EDIT, &*tmp, &*boost::next(tmp));
+ setUndo(bv, Undo::EDIT, tmp, boost::next(tmp));
tmp->params().startOfAppendix(false);
int tmpy;
setHeightOfRow(getRow(tmp, 0, tmpy));
}
}
- setUndo(bv, Undo::EDIT, &*pit, &*boost::next(pit));
+ setUndo(bv, Undo::EDIT, pit, boost::next(pit));
pit->params().startOfAppendix(start);
// we can set the refreshing parameters now
UpdatableInset * inset = static_cast<UpdatableInset *>(inset_hit);
selection_possible = false;
bv->owner()->message(inset->editMessage());
- //inset->edit(bv, x, y, cmd.button());
// We just have to lock the inset before calling a PressEvent on it!
- // we don't need the edit() call here! (Jug20020329)
if (!bv->lockInset(inset))
lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
FuncRequest cmd1(bv, LFUN_MOUSE_PRESS, x, y, cmd.button());