diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index ae5c94af4102fb0aa7bbb12d28fe4923175a9219..7282ad6cce76fe4d8e35d802bc0514395a7bc42a 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -21103,6 +21103,11 @@ impl Editor { cx.notify(); } + pub fn set_number_deleted_lines(&mut self, number: bool, cx: &mut Context) { + self.number_deleted_lines = number; + cx.notify(); + } + pub fn set_delegate_expand_excerpts(&mut self, delegate: bool) { self.delegate_expand_excerpts = delegate; } diff --git a/crates/editor/src/split.rs b/crates/editor/src/split.rs index 863342eea91d84e2fabd67da5871a81a5eb01585..2268bc5a8062f5f9ad15f92c9f0a3f7bdea32056 100644 --- a/crates/editor/src/split.rs +++ b/crates/editor/src/split.rs @@ -384,8 +384,10 @@ impl SplittableEditor { let lhs_editor = cx.new(|cx| { let mut editor = Editor::for_multibuffer(lhs_multibuffer.clone(), Some(project.clone()), window, cx); - editor.number_deleted_lines = true; + editor.set_number_deleted_lines(true, cx); editor.set_delegate_expand_excerpts(true); + editor.set_show_vertical_scrollbar(false, cx); + editor.set_minimap_visibility(crate::MinimapVisibility::Disabled, window, cx); editor }); @@ -2772,10 +2774,10 @@ mod tests { aaaa bbbb\x20 cccc dddd\x20 eeee ffff - deleted\x20 - line one - deleted\x20 - line two + deleted line\x20 + one + deleted line\x20 + two after" .unindent(), &mut cx,