current_view_->currentBufferView()->cursor().saveBeforeDispatchPosXY();
buffer = ¤t_view_->currentBufferView()->buffer();
}
- // This handles undo groups automagically
- UndoGroupHelper ugh(buffer);
DispatchResult dr;
+ dr.screenUpdate(Update::FitCursor);
+ {
+ // This handles undo groups automagically
+ UndoGroupHelper ugh(buffer);
+ dispatch(cmd, dr);
+ }
+
// redraw the screen at the end (first of the two drawing steps).
// This is done unless explicitly requested otherwise
- dr.screenUpdate(Update::FitCursor);
- dispatch(cmd, dr);
updateCurrentView(cmd, dr);
-
d->dispatch_result_ = dr;
return d->dispatch_result_;
}
}
case LFUN_SET_COLOR: {
- string lyx_name;
- string const x11_name = split(to_utf8(cmd.argument()), lyx_name, ' ');
+ string const lyx_name = cmd.getArg(0);
+ string const x11_name = cmd.getArg(1);
if (lyx_name.empty() || x11_name.empty()) {
if (current_view_)
current_view_->message(