int textnum;
ParIterator pit = text2pit(buf, text, textnum);
stack.push(Undo(kind, textnum, pit.index(),
- first_par, end_par, text->cursor.par(), text->cursor.pos()));
+ first_par, end_par, text->cursor().par(), text->cursor().pos()));
lyxerr << "undo record: " << stack.top() << std::endl;
// record the relevant paragraphs
<< std::endl;
// set cursor again to force the position to be the right one
- text->cursor.par(undo.cursor_par);
- text->cursor.pos(undo.cursor_pos);
+ text->cursor().par(undo.cursor_par);
+ text->cursor().pos(undo.cursor_pos);
// clear any selection
text->clearSelection();
- text->selection.cursor = text->cursor;
+ text->anchor() = text->cursor();
text->updateCounters();
// rebreak the entire lyxtext
otherstack.top().pars.insert(otherstack.top().pars.begin(), first, last);
}
LyXText * text = pit.text(buf);
- otherstack.top().cursor_pos = text->cursor.pos();
- otherstack.top().cursor_par = text->cursor.par();
+ otherstack.top().cursor_pos = text->cursor().pos();
+ otherstack.top().cursor_par = text->cursor().par();
lyxerr << " undo other: " << otherstack.top() << std::endl;
}
void recordUndo(BufferView * bv, Undo::undo_kind kind)
{
- recordUndo(kind, bv->text(), bv->text()->cursor.par());
+ recordUndo(kind, bv->text(), bv->text()->cursor().par());
}