diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 4922296dd009bcaf963c5fc01861bc1469626b6b..d5dac7d6602936c5eaa40f28a26f63d870ff2d34 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -716,6 +716,11 @@ impl EditorElement { let scroll_position = layout.position_map.snapshot.scroll_position(); let scroll_top = scroll_position.y * line_height; + if bounds.contains(&cx.mouse_position()) { + let stacking_order = cx.stacking_order().clone(); + cx.set_cursor_style(CursorStyle::Arrow, stacking_order); + } + let show_git_gutter = matches!( ProjectSettings::get_global(cx).git.git_gutter, Some(GitGutterSetting::TrackedFiles) @@ -915,7 +920,7 @@ impl EditorElement { bounds: text_bounds, stacking_order: cx.stacking_order().clone(), }; - if interactive_text_bounds.visibly_contains(&cx.mouse_position(), cx) { + if text_bounds.contains(&cx.mouse_position()) { if self .editor .read(cx) @@ -1557,7 +1562,7 @@ impl EditorElement { stacking_order: cx.stacking_order().clone(), }; let mut mouse_position = cx.mouse_position(); - if interactive_track_bounds.visibly_contains(&mouse_position, cx) { + if track_bounds.contains(&mouse_position) { cx.set_cursor_style( CursorStyle::Arrow, interactive_track_bounds.stacking_order.clone(), diff --git a/crates/gpui/src/window/element_cx.rs b/crates/gpui/src/window/element_cx.rs index 83e2ec18eff1c479003aee48380d62f7c266a5c3..46b5a21cf376636a05e9f6f59826994ade9d3aaa 100644 --- a/crates/gpui/src/window/element_cx.rs +++ b/crates/gpui/src/window/element_cx.rs @@ -409,7 +409,7 @@ impl<'a> ElementContext<'a> { .requested_cursor_style .as_ref() .map_or(true, |prev_style_request| { - style_request.stacking_order > prev_style_request.stacking_order + style_request.stacking_order >= prev_style_request.stacking_order }) { self.window.next_frame.requested_cursor_style = Some(style_request.clone());