diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 407609f7c..57dd9716b 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2649,9 +2649,7 @@ mod cmd { path.push("help"); path.push(format!("{}.txt", command)); - if !path.is_file() { - bail!("No help available for '{}'", args.join(" ")); - } + ensure!(path.is_file(), "No help available for '{}'", args.join(" ")); let id = cx.editor.open(path, Action::HorizontalSplit)?; cx.editor.document_mut(id).unwrap().set_path(None)?;