diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 1697851a3ee6..378f25f87ddf 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -56,7 +56,8 @@ ignore = "0.4" pulldown-cmark = { version = "0.9", default-features = false } # file type detection content_inspector = "0.2.4" -# openning URLs + +# opening URLs open = "5.0.0" url = "2.4.1" diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index eb3d3e6e3929..bc54abaaf690 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1217,10 +1217,10 @@ fn goto_file_impl(cx: &mut Context, action: Action) { } } -/// Opens url. If the URL is a valid textual file it is open in helix, other -/// the file is open using external program. +/// Opens the given url. If the URL points to a valid textual file it is open in helix. +// Otherwise, the file is open using external program. fn open_url(cx: &mut Context, url: Url, action: Action) { - let (_, doc) = current_ref!(cx.editor); + let doc = doc!(cx.editor); let rel_path = doc .relative_path() .map(|path| path.parent().unwrap().to_path_buf())