From 816dfee64aebfae8ce56b21eb8f2dbff210650aa Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 12 Dec 2022 20:06:07 -0600 Subject: [PATCH] Bail on zero-arg :help invocation --- helix-term/src/commands/typed.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 242eee70f..f599da09f 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1813,10 +1813,8 @@ fn help(cx: &mut compositor::Context, args: &[Cow], event: PromptEvent) -> return Ok(()); } - if args.is_empty() { - // TODO: Open a list of commands? - todo!() - } + // TODO: Open a list of commands / overview? + ensure!(!args.is_empty(), "Help topic or keybind required"); if args[0] == "topics" { let dir_path = helix_loader::runtime_dir().join("help/topics");