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.

Fix editor stealing click events from copy-error button

Thorsten Ball74f3366f425d
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 29d3e0aaea3..e602b23c8e9 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -388,7 +388,9 @@ impl EditorElement {
let mut click_count = event.click_count;
let modifiers = event.modifiers;
- if gutter_bounds.contains(&event.position) {
+ if cx.default_prevented() {
+ return;
+ } else if gutter_bounds.contains(&event.position) {
click_count = 3; // Simulate triple-click when clicking the gutter to select lines
} else if !text_bounds.contains(&event.position) {
return;