Add staged status information to diff hunks (#24475)

Release Notes:

- Render unstaged hunks in the project diff editor with a slashed
background

---------

Co-authored-by: maxbrunsfeld <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Cole Miller 2025-02-10 21:43:25 -05:00 committed by GitHub
parent a9de9e3cb4
commit 8f75fe25e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 1132 additions and 753 deletions

View file

@ -73,7 +73,7 @@ impl Anchor {
if let Some(base_text) = snapshot
.diffs
.get(&excerpt.buffer_id)
.and_then(|diff| diff.base_text.as_ref())
.and_then(|diff| diff.base_text())
{
let self_anchor = self.diff_base_anchor.filter(|a| base_text.can_resolve(a));
let other_anchor = other.diff_base_anchor.filter(|a| base_text.can_resolve(a));
@ -110,7 +110,7 @@ impl Anchor {
if let Some(base_text) = snapshot
.diffs
.get(&excerpt.buffer_id)
.and_then(|diff| diff.base_text.as_ref())
.and_then(|diff| diff.base_text())
{
if a.buffer_id == Some(base_text.remote_id()) {
return a.bias_left(base_text);
@ -135,7 +135,7 @@ impl Anchor {
if let Some(base_text) = snapshot
.diffs
.get(&excerpt.buffer_id)
.and_then(|diff| diff.base_text.as_ref())
.and_then(|diff| diff.base_text())
{
if a.buffer_id == Some(base_text.remote_id()) {
return a.bias_right(&base_text);