Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
editor: Fix hang when scrolling over single line input fields (#28471)
Finn Evers7cc3c03b083c
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex 613232c5ca0..7d53caeba90 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -6681,7 +6681,10 @@ impl Element for EditorElement {let max_row = snapshot.max_point().row().as_f32();// The max scroll position for the top of the window- let max_scroll_top = if matches!(snapshot.mode, EditorMode::AutoHeight { .. }) {+ let max_scroll_top = if matches!(+ snapshot.mode,+ EditorMode::AutoHeight { .. } | EditorMode::SingleLine { .. }+ ) {(max_row - height_in_lines + 1.).max(0.)} else {let settings = EditorSettings::get_global(cx);