Skip to content

Commit 5153f79

Browse files
author
Stephan Dilly
committed
fix selection bug
1 parent 52ec7e3 commit 5153f79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/commitlist.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ impl CommitList {
8989

9090
///
9191
pub fn selected_entry(&self) -> Option<&LogEntry> {
92-
self.items.iter().nth(self.selection)
92+
self.items.iter().nth(
93+
self.selection.saturating_sub(self.items.index_offset()),
94+
)
9395
}
9496

9597
fn move_selection(&mut self, scroll: ScrollType) -> Result<bool> {

0 commit comments

Comments
 (0)