Skip to content

Commit 40e9194

Browse files
author
Stephan Dilly
committed
fix wrong hunk highlighting after arrow-down at end of diff (closes #249)
1 parent aa1bf4f commit 40e9194

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/diff.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ impl DiffComponent {
215215
}
216216
};
217217

218-
self.selection =
219-
Selection::Single(cmp::min(max, new_start));
218+
let new_start = cmp::min(max, new_start);
219+
220+
self.selection = Selection::Single(new_start);
220221

221222
self.selected_hunk =
222223
Self::find_selected_hunk(diff, new_start)?;

0 commit comments

Comments
 (0)