Re-understand that the line just below git deletion is "inside" hunk

Fixes "go to previous hunk" getting stuck on a deletion, never going
further up
This commit is contained in:
Julia 2023-10-24 11:17:42 +02:00
parent 67e590202a
commit 48cdefe6cf
3 changed files with 46 additions and 6 deletions

View file

@ -7308,11 +7308,11 @@ impl Editor {
let display_point = initial_point.to_display_point(snapshot);
let mut hunks = hunks
.map(|hunk| diff_hunk_to_display(hunk, &snapshot))
.skip_while(|hunk| {
.filter(|hunk| {
if is_wrapped {
false
true
} else {
hunk.contains_display_row(display_point.row())
!hunk.contains_display_row(display_point.row())
}
})
.dedup();