Skip to content

Commit 7558d25

Browse files
committed
cleanup
1 parent a5b898c commit 7558d25

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/components/commitlist.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -636,23 +636,15 @@ impl CommitList {
636636
if !hit_upper_bound {
637637
self.selection = old_selection + offset;
638638

639-
if self
640-
.selected_entry()
641-
.map(|entry| entry.highlighted)
642-
.unwrap_or_default()
643-
{
639+
if self.selection_highlighted() {
644640
break;
645641
}
646642
}
647643

648644
if !hit_lower_bound {
649645
self.selection = old_selection - offset;
650646

651-
if self
652-
.selected_entry()
653-
.map(|entry| entry.highlighted)
654-
.unwrap_or_default()
655-
{
647+
if self.selection_highlighted() {
656648
break;
657649
}
658650
}
@@ -666,6 +658,12 @@ impl CommitList {
666658
}
667659
}
668660

661+
fn selection_highlighted(&mut self) -> bool {
662+
self.selected_entry()
663+
.map(|entry| entry.highlighted)
664+
.unwrap_or_default()
665+
}
666+
669667
///
670668
pub fn needs_data(&self, idx: usize, idx_max: usize) -> bool {
671669
self.items.needs_data(idx, idx_max)

0 commit comments

Comments
 (0)