Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix the tests
Kirill Bulatov4d5ff77abee0
diff --git a/crates/editor2/src/element.rs b/crates/editor2/src/element.rsindex c6d468f40b9..294cc2c4e3e 100644--- a/crates/editor2/src/element.rs+++ b/crates/editor2/src/element.rs@@ -1806,23 +1806,22 @@ impl EditorElement {let text_width = bounds.size.width - gutter_width;let overscroll = size(em_width, px(0.));- // todo!()- // let snapshot = {- // editor.set_visible_line_count((bounds.size.height / line_height).into(), cx);-- // let editor_width = text_width - gutter_margin - overscroll.width - em_width;- // let wrap_width = match editor.soft_wrap_mode(cx) {- // SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance,- // SoftWrap::EditorWidth => editor_width,- // SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance),- // };-- // if editor.set_wrap_width(Some(wrap_width), cx) {- // editor.snapshot(cx)- // } else {- // snapshot- // }- // };+ let _snapshot = {+ editor.set_visible_line_count((bounds.size.height / line_height).into(), cx);++ let editor_width = text_width - gutter_margin - overscroll.width - em_width;+ let wrap_width = match editor.soft_wrap_mode(cx) {+ SoftWrap::None => (MAX_LINE_LEN / 2) as f32 * em_advance,+ SoftWrap::EditorWidth => editor_width,+ SoftWrap::Column(column) => editor_width.min(column as f32 * em_advance),+ };++ if editor.set_wrap_width(Some(wrap_width), cx) {+ editor.snapshot(cx)+ } else {+ snapshot+ }+ };let wrap_guides = editor.wrap_guides(cx)