Automatically switch to unified diffs when diff view is narrower than a configurable "minimum split diff width" (#52781)

Release Notes:

- The git diff diff view now automatically switches from split mode to
unified mode when the pane is narrower than a configurable minimum
column count. You can configure this via the new
`minimum_split_diff_width` setting.
This commit is contained in:
Max Brunsfeld authored and GitHub committed 2026-03-30 18:47:50 -07:00
1 parent e39d5c9908
commit fb87786375
7 files changed
+208 -107

No files matched your search

+8
View File
@@ -226,6 +226,14 @@ pub struct EditorSettingsContent {
///
/// Default: split
pub diff_view_style: Option<DiffViewStyle>,
/// The minimum width (in em-widths) at which the split diff view is used.
/// When the editor is narrower than this, the diff view automatically
/// switches to unified mode and switches back when the editor is wide
/// enough. Set to 0 to disable automatic switching.
///
/// Default: 100
pub minimum_split_diff_width: Option<f32>,
}
#[derive(