Change the default staging and unstaging state display (#26299)
This adds a setting for the "border" hunk display mode, as discussed, and makes it the default. Here's how it looks in light mode: <img width="1512" alt="Screenshot 2025-03-07 at 11 39 25 AM" src="https://github.com/user-attachments/assets/a934faa3-ec69-47e1-ad46-535e48b98e9f" /> And dark mode: <img width="1511" alt="Screenshot 2025-03-07 at 11 39 56 AM" src="https://github.com/user-attachments/assets/43c9afd1-22bb-4bd8-96ce-82702a6cbc80" /> Release Notes: - Git Beta: Adjusted the default hunk styling for staged and unstaged changes Co-authored-by: Conrad <conrad@zed.dev> Co-authored-by: Nate <nate@zed.dev>
This commit is contained in:
co-authored by
Conrad
Nate
parent
05d3ee8555
commit
ec5e7a2653
@@ -634,7 +634,7 @@ impl Display for ColorSpace {
|
||||
}
|
||||
|
||||
/// A background color, which can be either a solid color or a linear gradient.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
#[repr(C)]
|
||||
pub struct Background {
|
||||
pub(crate) tag: BackgroundTag,
|
||||
@@ -646,6 +646,28 @@ pub struct Background {
|
||||
pad: u32,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for Background {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
match self.tag {
|
||||
BackgroundTag::Solid => write!(f, "Solid({:?})", self.solid),
|
||||
BackgroundTag::LinearGradient => {
|
||||
write!(
|
||||
f,
|
||||
"LinearGradient({}, {:?}, {:?})",
|
||||
self.gradient_angle_or_pattern_height, self.colors[0], self.colors[1]
|
||||
)
|
||||
}
|
||||
BackgroundTag::PatternSlash => {
|
||||
write!(
|
||||
f,
|
||||
"PatternSlash({:?}, {})",
|
||||
self.solid, self.gradient_angle_or_pattern_height
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for Background {}
|
||||
impl Default for Background {
|
||||
fn default() -> Self {
|
||||
|
||||
Reference in New Issue
Block a user