for (; depth(); pop(), boundary(false)) {
LYXERR(Debug::DEBUG, "Cursor::dispatch: cmd: "
<< cmd0 << endl << *this);
- // LASSERT: Is it safe to continue here, or should we return?
- LASSERT(pos() <= lastpos(), /**/);
- LASSERT(idx() <= lastidx(), /**/);
- LASSERT(pit() <= lastpit(), /**/);
+
+ // In any of these cases, the cursor is invalid, and we should
+ // try to save this document rather than crash.
+ LBUFERR(pos() <= lastpos());
+ LBUFERR(idx() <= lastidx());
+ LBUFERR(pit() <= lastpit());
// The common case is 'LFUN handled, need update', so make the
// LFUN handler's life easier by assuming this as default value.
updateNeeded |= bv().checkDepm(dummy, *this);
updateTextTargetOffset();
- if (updateNeeded) {
+ if (updateNeeded)
forceBufferUpdate();
- // DEPM may have requested a screen update
- this->screenUpdateFlags(
- this->screenUpdate() | dummy.screenUpdate());
- }
}
return false;
}
++dummy.pos();
if (bv().checkDepm(dummy, old)) {
updateNeeded = true;
- // Make sure that cur gets back whatever happened to dummy (Lgb)
- // This will include any screen update requested by DEPM
+ // Make sure that cur gets back whatever happened to dummy (Lgb)
operator=(dummy);
}
} else {