echo command can take a -col parameter to specify the colors to use
This commit is contained in:
parent
b057ab5462
commit
dbffcb226b
|
@ -432,10 +432,14 @@ void define_command(const CommandParameters& params, Context& context)
|
||||||
|
|
||||||
void echo_message(const CommandParameters& params, Context& context)
|
void echo_message(const CommandParameters& params, Context& context)
|
||||||
{
|
{
|
||||||
|
ParametersParser parser(params, { { "col", true } },
|
||||||
|
ParametersParser::Flags::OptionsOnlyAtStart);
|
||||||
String message;
|
String message;
|
||||||
for (auto& param : params)
|
for (auto& param : parser)
|
||||||
message += param + " ";
|
message += param + " ";
|
||||||
context.print_status({ std::move(message), get_color("StatusLine") } );
|
ColorPair color = get_color(parser.has_option("col") ?
|
||||||
|
parser.option_value("col") : "StatusLine");
|
||||||
|
context.print_status({ std::move(message), color } );
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_debug_message(const CommandParameters& params, Context&)
|
void write_debug_message(const CommandParameters& params, Context&)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user