Fix buffer rendering on every mouse move (#32408)

Closes #32210

This notify was added in #13433. Solution is to only notify when the
breakpoint indicator state has changed.

Also improves the logic for enqueuing a task to delay showing - now only
does this if it isn't already visible, and that delay task now only
notifies if still hovering.

Release Notes:

- Fixed a bug where buffers render on every mouse move.
This commit is contained in:
Michael Sloan 2025-06-09 14:10:03 -06:00 committed by GitHub
parent c4fd9e1a6b
commit bbd2262a93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 26 deletions

View file

@ -923,7 +923,7 @@ enum SelectionDragState {
/// Represents a breakpoint indicator that shows up when hovering over lines in the gutter that don't have
/// a breakpoint on them.
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
struct PhantomBreakpointIndicator {
display_row: DisplayRow,
/// There's a small debounce between hovering over the line and showing the indicator.
@ -931,6 +931,7 @@ struct PhantomBreakpointIndicator {
is_active: bool,
collides_with_existing_breakpoint: bool,
}
/// Zed's primary implementation of text input, allowing users to edit a [`MultiBuffer`].
///
/// See the [module level documentation](self) for more information.