Skip to content

Commit

Permalink
fix: jumping to location did not convert the URI correctly
Browse files Browse the repository at this point in the history
thus breaking Windows
  • Loading branch information
archseer committed Jun 25, 2021
1 parent 8e277ad commit 503ca11
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2069,9 +2069,11 @@ fn goto_impl(
offset_encoding: OffsetEncoding,
action: Action,
) {
let id = editor
.open(PathBuf::from(location.uri.path()), action)
.expect("editor.open failed");
let path = location
.uri
.to_file_path()
.expect("unable to convert URI to filepath");
let id = editor.open(path, action).expect("editor.open failed");
let (view, doc) = current!(editor);
let definition_pos = location.range.start;
// TODO: convert inside server
Expand Down

0 comments on commit 503ca11

Please sign in to comment.