mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-19 11:04:06 +00:00
When a language server omits the `range` field in its hover response and
syntax tree fallback fails, Zed falls back to a zero-width hover range
(`anchor..anchor`). Previously, because the check used an exact offset
match, any slight cursor movement within the same symbol would treat it
as a new hover target, immediately dismissing the existing popover and
triggering repeated requests. This caused flickering and made it
impossible to move the cursor into the popover to interact with it.
This PR fixes the issue by falling back to `surrounding_word` when
checking if an anchor is contained within a zero-width hover range,
allowing cursor movement within the same word without dismissing the
popover.
Release Notes:
- Fixed hover popovers flickering or prematurely dismissing on mouse
movement when using language servers that omit range information.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||