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(
dr.setMessage(bformat(_("Cannot iterate more than %1$d times"), max_iter));
dr.setError(true);
} else {
- for (int i = 0; i < count; ++i)
- dispatch(lyxaction.lookupFunc(rest));
+ for (int i = 0; i < count; ++i) {
+ FuncRequest lfun = lyxaction.lookupFunc(rest);
+ lfun.allowAsync(false);
+ dispatch(lfun);
+ }
}
break;
}
string first;
arg = split(arg, first, ';');
FuncRequest func(lyxaction.lookupFunc(first));
+ func.allowAsync(false);
func.setOrigin(cmd.origin());
dispatch(func);
}