mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
cleanup
This commit is contained in:
parent
a5b898c718
commit
7558d25e25
1 changed files with 8 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue