From 2570382f88596a18ac66ee5ec02ae7ac1524dfd3 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Sun, 1 Feb 2026 00:49:18 -0500 Subject: [PATCH] git: Disable vertical scrollbar for side-by-side diff LHS (#48129) Also the minimap, although this is currently symbolic since the minimap doesn't support multibuffers. Release Notes: - N/A --- crates/editor/src/editor.rs | 5 +++++ crates/editor/src/split.rs | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) 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,