void BufferView::processUpdateFlags(Update::flags flags)
{
+ // last_inset_ points to the last visited inset. This pointer may become
+ // invalid because of keyboard editing. Since all such operations
+ // causes screen update(), I reset last_inset_ to avoid such a problem.
+ d->last_inset_ = 0;
+
// This is close to a hot-path.
LYXERR(Debug::DEBUG, "BufferView::processUpdateFlags()"
<< "[fitcursor = " << (flags & Update::FitCursor)
d->cursor_.fixIfBroken();
// FIXME: shift-mouse selection doesn't work well across insets.
- bool do_selection = select && &d->cursor_.anchor().inset() == &cur.inset();
+ bool do_selection = select && &d->cursor_.normalAnchor().inset() == &cur.inset();
// do the dEPM magic if needed
// FIXME: (1) move this to InsetText::notifyCursorLeaves?
// set update flags
if (changed) {
- if (singlePar && !(cur.disp_.update() & Update::Force))
- cur.updateFlags(cur.disp_.update() | Update::SinglePar);
+ if (singlePar && !(cur.result().update() & Update::Force))
+ cur.updateFlags(cur.result().update() | Update::SinglePar);
else
- cur.updateFlags(cur.disp_.update() | Update::Force);
+ cur.updateFlags(cur.result().update() | Update::Force);
}
}