editor: Fix diff hunk controls not shown until buffer interaction (#32692)

Similar to https://github.com/zed-industries/zed/pull/32683, checking
mouse hovered in `mouse_move` instead of `prepaint` for diff hunk
controls.

Release Notes:

- Fixed issue where diff hunk controls were not visible on mouse hover
when `cursor_blink` is `false`.
This commit is contained in:
Smit Barmase 2025-06-13 22:29:49 +05:30 committed by GitHub
parent 71dbe88459
commit 2aa79a022e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 82 additions and 47 deletions

View file

@ -1088,6 +1088,7 @@ pub struct Editor {
tasks_update_task: Option<Task<()>>,
breakpoint_store: Option<Entity<BreakpointStore>>,
gutter_breakpoint_indicator: (Option<PhantomBreakpointIndicator>, Option<Task<()>>),
hovered_diff_hunk_row: Option<DisplayRow>,
pull_diagnostics_task: Task<()>,
in_project_search: bool,
previous_search_ranges: Option<Arc<[Range<Anchor>]>>,
@ -2016,6 +2017,7 @@ impl Editor {
breakpoint_store,
gutter_breakpoint_indicator: (None, None),
hovered_diff_hunk_row: None,
_subscriptions: vec![
cx.observe(&buffer, Self::on_buffer_changed),
cx.subscribe_in(&buffer, window, Self::on_buffer_event),