mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Use stricter inlay range checks to avoid stuck highlights
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.
This commit is contained in:
parent
8ed280a029
commit
0a18aa694f
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue