mirror of https://github.com/helix-editor/helix
remove erroneous no such command when the command succeeds
parent
c9b52761ec
commit
43b9dd3e65
|
@ -267,10 +267,11 @@ impl MappableCommand {
|
|||
} else {
|
||||
// TODO: Update this
|
||||
let args = args.split_whitespace().map(Cow::from).collect();
|
||||
ScriptingEngine::call_function_by_name(cx, name, args);
|
||||
if !ScriptingEngine::call_function_by_name(cx, name, args) {
|
||||
cx.editor.set_error(format!("no such command: '{name}'"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Self::Static { fun, .. } => (fun)(cx),
|
||||
Self::Macro { keys, .. } => {
|
||||
// Protect against recursive macros.
|
||||
|
|
Loading…
Reference in New Issue