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:
parent
c4fd9e1a6b
commit
bbd2262a93
2 changed files with 31 additions and 26 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue