From 0f72d7ed52bad0c8f6a5e504a2adf9670d726814 Mon Sep 17 00:00:00 2001 From: Smit Barmase Date: Thu, 17 Jul 2025 22:46:44 +0530 Subject: [PATCH] editor: Fix sometimes green (+) cursor style appearing when cmd-clicking in same buffer (#34638) Follow-up for https://github.com/zed-industries/zed/pull/34557 This PR clears the selection drag state on click, because mouse up doesn't trigger on click event because of `cx.stop_propagation`. The issue occurs with similar repro steps as mentioned in the attached PR. Release Notes: - Fixed the issue where the green (+) cursor style sometimes appears when navigating to the definition in buffer. --- crates/editor/src/element.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index e77be3398ca0fcef9edf65a0a318f94bd21a4fc8..fef185bb156085655c8a144cb3d06c70d8558f2c 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -949,6 +949,7 @@ impl EditorElement { if !pending_nonempty_selections && hovered_link_modifier && text_hitbox.is_hovered(window) { let point = position_map.point_for_position(event.up.position); editor.handle_click_hovered_link(point, event.modifiers(), window, cx); + editor.selection_drag_state = SelectionDragState::None; cx.stop_propagation(); }