1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-06-02 20:16:04 +02:00

fix: jumping to location did not convert the URI correctly

thus breaking Windows
This commit is contained in:
Blaž Hrastnik 2021-06-25 13:20:15 +09:00
parent 8e277ad8ba
commit 503ca112ae

View File

@ -2069,9 +2069,11 @@ fn jump_to(
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