if (lyx_view_ == 0)
break;
+ // Start an undo group. This may be needed for
+ // some stuff like inset-apply on labels.
+ if (lyx_view_->view())
+ view()->cursor().beginUndoGroup();
+
// Let the current LyXView dispatch its own actions.
if (lyx_view_->dispatch(cmd)) {
- if (lyx_view_->view())
+ if (lyx_view_->view()) {
updateFlags = lyx_view_->view()->cursor().result().update();
+ view()->cursor().endUndoGroup();
+ }
break;
}
LASSERT(lyx_view_->view(), /**/);
+
// Let the current BufferView dispatch its own actions.
if (view()->dispatch(cmd)) {
// The BufferView took care of its own updates if needed.
updateFlags = Update::None;
+ view()->cursor().endUndoGroup();
break;
}
view()->cursor().fixIfBroken();
}
+ // we assume here that the buffer view has not
+ // changed since the beginUndoGroup.
+ view()->cursor().endUndoGroup();
+
// update completion. We do it here and not in
// processKeySym to avoid another redraw just for a
// changed inline completion
case LyXRC::RC_FORMAT:
case LyXRC::RC_GROUP_LAYOUTS:
case LyXRC::RC_INDEX_COMMAND:
+ case LyXRC::RC_NOMENCL_COMMAND:
case LyXRC::RC_INPUT:
case LyXRC::RC_KBMAP:
case LyXRC::RC_KBMAP_PRIMARY: