Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Correctly re-render mouse cursor when hovering over pane group divider (#9270)

Thorsten Ballac4bbb61352c
diff --git a/crates/workspace/src/pane_group.rs b/crates/workspace/src/pane_group.rs
index 63e9e7d3a4a..e2625683e08 100644
--- a/crates/workspace/src/pane_group.rs
+++ b/crates/workspace/src/pane_group.rs
@@ -941,19 +941,25 @@ mod element {
let flexes = self.flexes.clone();
let child_bounds = child.bounds;
let axis = self.axis;
+ let handle_hitbox = handle.hitbox.clone();
+ let was_hovered = handle_hitbox.is_hovered(cx);
move |e: &MouseMoveEvent, phase, cx| {
let dragged_handle = dragged_handle.borrow();
- if phase.bubble() && *dragged_handle == Some(ix) {
- Self::compute_resize(
- &flexes,
- e,
- ix,
- axis,
- child_bounds.origin,
- bounds.size,
- workspace.clone(),
- cx,
- )
+ if phase.bubble() {
+ if *dragged_handle == Some(ix) {
+ Self::compute_resize(
+ &flexes,
+ e,
+ ix,
+ axis,
+ child_bounds.origin,
+ bounds.size,
+ workspace.clone(),
+ cx,
+ )
+ } else if was_hovered != handle_hitbox.is_hovered(cx) {
+ cx.refresh();
+ }
}
}
});