From 43b9dd3e6504909fb83487365a80e96893c0e1cd Mon Sep 17 00:00:00 2001 From: Matt Paras Date: Tue, 8 Apr 2025 17:44:50 -0700 Subject: [PATCH] remove erroneous no such command when the command succeeds --- helix-term/src/commands.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 48ba1a06f..06bda783b 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -267,8 +267,9 @@ impl MappableCommand { } else { // TODO: Update this let args = args.split_whitespace().map(Cow::from).collect(); - ScriptingEngine::call_function_by_name(cx, name, args); - cx.editor.set_error(format!("no such command: '{name}'")); + if !ScriptingEngine::call_function_by_name(cx, name, args) { + cx.editor.set_error(format!("no such command: '{name}'")); + } } } Self::Static { fun, .. } => (fun)(cx),