mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 06:24:56 +00:00
Follow-up to https://github.com/zed-industries/zed/pull/41111. PR #41111 introduced combined injection handling, but cursor language queries still relied on layer range selection alone. For combined injections this can surface a language from the outer combined layer even when the cursor is outside that language's actual included sub-range. So, we just need to add sub-range filtering based on anchor-aware boundary checks in the same way we did in the previous PR. That means: apply it in `Buffer::language_at`, `Buffer::languages_at`, and `BufferSnapshot::language_scope_at`. All places that rely on the described behavior. I also added some additional test cases for the `HTML+ERB` lang to verify language resolution for HTML and Ruby positions. Thank you! Closes https://github.com/zed-industries/zed/issues/48358 Release Notes: - Respect combined injection sub-ranges for language queries |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||
| LICENSE-GPL | ||