This commit is contained in:
extrawurst 2023-08-23 19:40:24 +02:00
parent a5b898c718
commit 7558d25e25

View file

@ -636,11 +636,7 @@ impl CommitList {
if !hit_upper_bound {
self.selection = old_selection + offset;
if self
.selected_entry()
.map(|entry| entry.highlighted)
.unwrap_or_default()
{
if self.selection_highlighted() {
break;
}
}
@ -648,11 +644,7 @@ impl CommitList {
if !hit_lower_bound {
self.selection = old_selection - offset;
if self
.selected_entry()
.map(|entry| entry.highlighted)
.unwrap_or_default()
{
if self.selection_highlighted() {
break;
}
}
@ -666,6 +658,12 @@ impl CommitList {
}
}
fn selection_highlighted(&mut self) -> bool {
self.selected_entry()
.map(|entry| entry.highlighted)
.unwrap_or_default()
}
///
pub fn needs_data(&self, idx: usize, idx_max: usize) -> bool {
self.items.needs_data(idx, idx_max)