fix: goto_file_impl
incorrect use of slice
instead of byte_slice
(#12673)
This commit is contained in:
parent
de738bac6a
commit
3fdd98979c
1 changed files with 1 additions and 1 deletions
|
@ -1303,7 +1303,7 @@ fn goto_file_impl(cx: &mut Context, action: Action) {
|
|||
let search_end = text
|
||||
.line_to_byte(text.byte_to_line(pos) + 1)
|
||||
.min(pos + 1000);
|
||||
let search_range = text.slice(search_start..search_end);
|
||||
let search_range = text.byte_slice(search_start..search_end);
|
||||
// we also allow paths that are next to the cursor (can be ambiguous but
|
||||
// rarely so in practice) so that gf on quoted/braced path works (not sure about this
|
||||
// but apparently that is how gf has worked historically in helix)
|
||||
|
|
Loading…
Add table
Reference in a new issue