Skip to content

Commit

Permalink
fix based on code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
matoous committed Nov 21, 2023
1 parent a1c6d42 commit b530d03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion helix-term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b530d03

Please sign in to comment.