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 scrolling when closing tab using middle mouse button (#12429)

Bennet Bo Fennerdca5bc598685
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 5184e9351c4..eb4cb978c81 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -542,7 +542,7 @@ impl EditorElement {
text_hitbox: &Hitbox,
cx: &mut ViewContext<Editor>,
) {
- if cx.default_prevented() {
+ if !text_hitbox.is_hovered(cx) || cx.default_prevented() {
return;
}