Color staged and unstaged hunks differently by opacity (#25108)

Release Notes:

- Make staged diff hunks appear as more opaque than unstaged hunks

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
Cole Miller
2025-02-19 18:33:21 +00:00
committed by GitHub
co-authored by Nate Butler
parent c9bd44f983
commit 8e17b34eff
11 changed files with 265 additions and 175 deletions
+1 -1
View File
@@ -15956,7 +15956,7 @@ impl EditorSnapshot {
) {
// Deleted hunk is an empty row range, no caret can be placed there and Zed allows to revert it
// when the caret is just above or just below the deleted hunk.
let allow_adjacent = hunk.status().is_removed();
let allow_adjacent = hunk.status().is_deleted();
let related_to_selection = if allow_adjacent {
hunk.row_range.overlaps(&query_rows)
|| hunk.row_range.start == query_rows.end