Validating an empty command in prompt reruns the last command
This is more consistent with other prompts like regexes or shells, and has proven useful from time to time.
This commit is contained in:
parent
9bbab690ba
commit
14958a7c94
|
@ -450,7 +450,11 @@ void command(Context& context, NormalParams params)
|
|||
}
|
||||
if (event == PromptEvent::Validate)
|
||||
{
|
||||
if (cmdline.empty())
|
||||
cmdline = context.main_sel_register_value(':');
|
||||
else
|
||||
RegisterManager::instance()[':'].set(context, cmdline.str());
|
||||
|
||||
EnvVarMap env_vars = {
|
||||
{ "count", to_string(params.count) },
|
||||
{ "register", String{¶ms.reg, 1} }
|
||||
|
|
Loading…
Reference in New Issue
Block a user