Le 14/10/2016 à 17:51, Scott Kostyshak a écrit :
Any thoughts?

I would propose instead to use the helpers getArg and getLongArg in FuncRequest. Two possibilities:

lyx_name = cmd.getArg(0);
x11_name = cmd.getLongArg(1);

This will do what you want, at the price of a badly defined syntax: it would make more sense to keep the space as a parameter separator.

The second solution would be to use

lyx_name = cmd.getArg(0);
x11_name = cmd.getArg(1);

In this case, the syntax for set-color would be
set-color foo bar
set-color "foo bar" baz
set-color foo "bar baz"

I really prefer this second solution. And any of these is better than relying on split and rtrim.

Final remark: it seems to me that this LFUN should be named "color-set" (set-graphics-group has the same problem).


Reply via email to