fix selection bug

This commit is contained in:
Stephan Dilly 2020-05-25 21:14:25 +02:00
parent 52ec7e342c
commit 5153f79080

View file

@ -89,7 +89,9 @@ impl CommitList {
///
pub fn selected_entry(&self) -> Option<&LogEntry> {
self.items.iter().nth(self.selection)
self.items.iter().nth(
self.selection.saturating_sub(self.items.index_offset()),
)
}
fn move_selection(&mut self, scroll: ScrollType) -> Result<bool> {