zed/crates/editor
Shuhei Kadowaki 9ea9b04634 editor: Fix inlay-hint hover targeting and popover position
When two type hints sit one source character apart (e.g. a `::T` hint
just before a closing token and another `::U` hint right after it),
`clip_point(_, Bias::Right)` skips through the lone source character so
both hints fall inside the buffer-position window used to find a hovered
hint. The previous `max_by_key(|hint| hint.id)` heuristic then picked an
arbitrary one, which often was not the inlay actually under the mouse.
Filter the candidate hints by the actual mouse `hovered_offset` so the
hint whose rendered text is under the cursor is the one resolved for
hover and link navigation.

Additionally, the popover previously used the inlay's buffer anchor
directly, which in display space always lands at the inlay's leading
edge — so for long or multi-part inlays the popover would appear at the
start of the inlay regardless of which character was hovered. Resolve
the actual display position by adding the in-inlay byte offset onto the
inlay's start.
2026-05-21 21:06:07 +09:00
..
benches theme: Split out theme_settings crate (#52569) 2026-03-27 14:41:25 +01:00
src editor: Fix inlay-hint hover targeting and popover position 2026-05-21 21:06:07 +09:00
Cargo.toml editor: Add base64 encode/decode commands (#55361) 2026-05-05 04:36:18 +00:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00