Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove redundant `autoscroll_horizontally` during editor prepaint (#34218)
Michael Sloane2e529bd943d
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rsindex 8a5bfb3babd..014583912fd 100644--- a/crates/editor/src/element.rs+++ b/crates/editor/src/element.rs@@ -8614,29 +8614,6 @@ impl Element for EditorElement {cx,);- self.editor.update(cx, |editor, cx| {- let clamped = editor.scroll_manager.clamp_scroll_left(scroll_max.x);-- let autoscrolled = if autoscroll_horizontally {- editor.autoscroll_horizontally(- start_row,- editor_content_width,- scroll_width,- em_advance,- &line_layouts,- window,- cx,- )- } else {- false- };-- if clamped || autoscrolled {- snapshot = editor.snapshot(window, cx);- scroll_position = snapshot.scroll_position();- }- });-let line_elements = self.prepaint_lines(start_row,&mut line_layouts,