#include "undo.h"
#include "buffer.h"
+#include "cursor_slice.h"
#include "debug.h"
#include "BufferView.h"
#include "iterators.h"
<< 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);
+ bv->cursor().par(undo.cursor_par);
+ bv->cursor().pos(undo.cursor_pos);
// clear any selection
- text->clearSelection();
+ bv->clearSelection();
bv->resetAnchor();
text->updateCounters();
advance(last, plist.size() - undo.end_par + 1);
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 = bv->cursor().pos();
+ otherstack.top().cursor_par = bv->cursor().par();
lyxerr << " undo other: " << otherstack.top() << std::endl;
}