mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 14:11:55 +00:00
fix subdir bug
This commit is contained in:
parent
d7da907a9c
commit
f6b8358fcc
|
@ -508,7 +508,12 @@ impl AppState {
|
||||||
let list_start = areas.list.y + 4;
|
let list_start = areas.list.y + 4;
|
||||||
let relative_y = position.y.saturating_sub(list_start);
|
let relative_y = position.y.saturating_sub(list_start);
|
||||||
let list_len = self.filter.item_list().len();
|
let list_len = self.filter.item_list().len();
|
||||||
if relative_y < list_len as u16 {
|
let adjusted_len = if self.at_root() {
|
||||||
|
list_len
|
||||||
|
} else {
|
||||||
|
list_len + 1
|
||||||
|
};
|
||||||
|
if relative_y < adjusted_len as u16 {
|
||||||
self.selection.select(Some(relative_y as usize));
|
self.selection.select(Some(relative_y as usize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user