Unnamed repository; edit this file 'description' to name the repository.
Bail on zero-arg :help invocation
Michael Davis 2022-12-13
parent 321fce3 · commit 816dfee
-rw-r--r--helix-term/src/commands/typed.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 242eee70..f599da09 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<str>], 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");