diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index b5b6ac6de..ff8d7a4ff 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2485,6 +2485,10 @@ mod cmd { args: &[&str], _event: PromptEvent, ) -> anyhow::Result<()> { + if args.is_empty() { + bail!("Line number required"); + } + let line = args[0].parse::()?; goto_line_impl(&mut cx.editor, NonZeroUsize::new(line));