mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28: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 {
|
if !hit_upper_bound {
|
||||||
self.selection = old_selection + offset;
|
self.selection = old_selection + offset;
|
||||||
|
|
||||||
if self
|
if self.selection_highlighted() {
|
||||||
.selected_entry()
|
|
||||||
.map(|entry| entry.highlighted)
|
|
||||||
.unwrap_or_default()
|
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -648,11 +644,7 @@ impl CommitList {
|
||||||
if !hit_lower_bound {
|
if !hit_lower_bound {
|
||||||
self.selection = old_selection - offset;
|
self.selection = old_selection - offset;
|
||||||
|
|
||||||
if self
|
if self.selection_highlighted() {
|
||||||
.selected_entry()
|
|
||||||
.map(|entry| entry.highlighted)
|
|
||||||
.unwrap_or_default()
|
|
||||||
{
|
|
||||||
break;
|
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 {
|
pub fn needs_data(&self, idx: usize, idx_max: usize) -> bool {
|
||||||
self.items.needs_data(idx, idx_max)
|
self.items.needs_data(idx, idx_max)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue