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:
parent
67e590202a
commit
48cdefe6cf
3 changed files with 46 additions and 6 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue