+2001-12-20 Juergen Vigna <jug@sad.it>
+
+ * undo_funcs.C (textHandleUndo): fixed crash when undo_cursor not
+ inside inset but undo_par was.
+
2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* Thesaurus.C: always include <config.h> in sources.
* tabular_funcs.[hC]: added and moved here all not classfunctions
of LyXTabular.
->>>>>>> 1.472
2001-12-19 Juergen Vigna <jug@sad.it>
* tabular.[Ch]: better support for longtabular options (not finished
2001-12-20 Juergen Vigna <jug@sad.it>
+ * inset.C (cursor): return the owners cursor if available instead of
+ always only the bv->text->cursor.
+
* insettabular.C (checkLongtableSpecial): works now.
2001-12-19 Juergen Vigna <jug@sad.it>
LyXCursor const & Inset::cursor(BufferView * bv) const
{
+ if (owner())
+ return owner()->getLyXText(bv, false)->cursor;
return bv->text->cursor;
}
bv->text->cursor.par());
if (tmppar){
it = static_cast<UpdatableInset*>(tmppar->inInset());
- it->edit(bv);
- it->getLyXText(bv)->setCursorIntern(bv, tmppar, undo->cursor_pos);
- it->getLyXText(bv)->updateCounters(bv, it->getLyXText(bv)->cursor.row());
+ LyXText * t;
+ if (it) {
+ it->edit(bv);
+ t = it->getLyXText(bv);
+ } else {
+ t = bv->text;
+ }
+ t->setCursorIntern(bv, tmppar, undo->cursor_pos);
+ t->updateCounters(bv, t->cursor.row());
}
bv->text->setCursorIntern(bv, bv->text->cursor.par(),
bv->text->cursor.pos());