mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
fix selection bug
This commit is contained in:
parent
52ec7e342c
commit
5153f79080
1 changed files with 3 additions and 1 deletions
|
|
@ -89,7 +89,9 @@ impl CommitList {
|
||||||
|
|
||||||
///
|
///
|
||||||
pub fn selected_entry(&self) -> Option<&LogEntry> {
|
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> {
|
fn move_selection(&mut self, scroll: ScrollType) -> Result<bool> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue