diff --git a/src/components/diff.rs b/src/components/diff.rs index b97b4dc1..1b8793a7 100644 --- a/src/components/diff.rs +++ b/src/components/diff.rs @@ -215,8 +215,9 @@ impl DiffComponent { } }; - self.selection = - Selection::Single(cmp::min(max, new_start)); + let new_start = cmp::min(max, new_start); + + self.selection = Selection::Single(new_start); self.selected_hunk = Self::find_selected_hunk(diff, new_start)?;