Use stricter inlay range checks to avoid stuck highlights
Kirill Bulatov
created
Often, hint ranges are separated by a single '<` char as in
`Option<Vec<u32>>`. When moving the caret from left to right, avoid
inclusive ranges to faster update the matching hint underline.
@@ -88,7 +88,7 @@ pub fn hover_at_inlay(editor: &mut Editor, inlay_hover: InlayHover, cx: &mut Vie
if let Some(InfoPopover { symbol_range, .. }) = &editor.hover_state.info_popover {
if let DocumentRange::Inlay(range) = symbol_range {
- if (range.highlight_start..=range.highlight_end)
+ if (range.highlight_start..range.highlight_end)
.contains(&inlay_hover.triggered_from)
{
// Hover triggered from same location as last time. Don't show again.