+2003-11-03 Alfredo Braunstein <abraunst@libero.it>
+
+ * undo.C (performUndoOrRedo): fix cursor positioning with lockPath
+
2003-11-03 Lars Gullik Bjønnes <larsbj@gullik.net>
* text3.C (dispatch): adjust for new DisptchResult semantics.
// set cursor
lyxerr << "undo, text: " << undo.text
- << " inset: " << pit.inset()
- << " index: " << undo.index
- << std::endl;
+ << " inset: " << pit.inset()
+ << " index: " << undo.index
+ << " par: " << undo.cursor_par
+ << " pos: " << undo.cursor_pos
+ << std::endl;
// set cursor again to force the position to be the right one
text->cursor.par(undo.cursor_par);
// rebreak the entire lyxtext
bv->text->fullRebreak();
- InsetOld * inset = pit.inset();
- if (inset) {
- // magic needed to cope with inset locking
- bv->lockInset(dynamic_cast<UpdatableInset *>(inset));
- }
-
+ pit.lockPath(bv);
+
finishUndo();
return true;
}