fixIfBroken();
FuncRequest cmd = cmd0;
Cursor safe = *this;
+ disp_ = DispatchResult();
buffer()->undo().beginUndoGroup();
if (lyxaction.funcHasFlag(cmd.action(), LyXAction::AtPoint)
&& nextInset()) {
disp_.dispatched(true);
- disp_.update(Update::FitCursor | Update::Force);
+ disp_.screenUpdate(Update::FitCursor | Update::Force);
FuncRequest tmpcmd = cmd;
LYXERR(Debug::DEBUG, "Cursor::dispatch: (AtPoint) cmd: "
<< cmd0 << endl << *this);
// The common case is 'LFUN handled, need update', so make the
// LFUN handler's life easier by assuming this as default value.
// The handler can reset the update and val flags if necessary.
- disp_.update(Update::FitCursor | Update::Force);
+ disp_.screenUpdate(Update::FitCursor | Update::Force);
disp_.dispatched(true);
inset().dispatch(*this, cmd);
if (disp_.dispatched())
safe.pos() = safe.lastpos();
}
operator=(safe);
- disp_.update(Update::None);
+ disp_.screenUpdate(Update::None);
disp_.dispatched(false);
} else {
// restore the previous one because nested Cursor::dispatch calls
++pos();
inset().setBuffer(bv_->buffer());
inset().initView();
+ forceBufferUpdate();
}
text()->insertInset(*this, inset0);
inset0->setBuffer(bv_->buffer());
inset0->initView();
+ if (inset0->isLabeled())
+ forceBufferUpdate();
}
}
cap::eraseSelection(*this);
cell().insert(pos(), ar);
pos() += ar.size();
- // FIXME audit setBuffer/updateBuffer calls
+ // FIXME audit setBuffer calls
inset().setBuffer(bv_->buffer());
}
updateNeeded |= bv().checkDepm(dummy, *this);
updateTextTargetOffset();
+ if (updateNeeded)
+ forceBufferUpdate();
}
return false;
}
++dummy.pos();
if (bv().checkDepm(dummy, old)) {
updateNeeded = true;
- // Make sure that cur gets back whatever happened to dummy(Lgb)
+ // Make sure that cur gets back whatever happened to dummy (Lgb)
operator=(dummy);
}
} else {
updateNeeded |= bv().checkDepm(*this, old);
}
+ if (updateNeeded)
+ forceBufferUpdate();
updateTextTargetOffset();
return true;
}
void Cursor::screenUpdateFlags(Update::flags f)
{
- disp_.update(f);
+ disp_.screenUpdate(f);
+}
+
+
+void Cursor::forceBufferUpdate()
+{
+ disp_.forceBufferUpdate();
+}
+
+
+void Cursor::clearBufferUpdate()
+{
+ disp_.clearBufferUpdate();
+}
+
+
+bool Cursor::needBufferUpdate() const
+{
+ return disp_.needBufferUpdate();
}
void Cursor::noScreenUpdate()
{
- disp_.update(Update::None);
+ disp_.screenUpdate(Update::None);
}