diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 2a5bb974d..f43b03ade 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -1402,7 +1402,7 @@ impl LanguageLayer { &mut |byte, _| { if byte <= source.len_bytes() { let (chunk, start_byte, _, _) = source.chunk_at_byte(byte); - chunk[byte - start_byte..].as_bytes() + &chunk.as_bytes()[byte - start_byte..] } else { // out of range &[]