mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
safety first
This commit is contained in:
parent
3ec47ced67
commit
c784c9e9b3
1 changed files with 1 additions and 1 deletions
|
|
@ -253,7 +253,7 @@ impl DrawableComponent for FileTreeComponent {
|
|||
let select = self
|
||||
.tree
|
||||
.selection
|
||||
.map(|idx| idx - selection_offset)
|
||||
.map(|idx| idx.saturating_sub(selection_offset))
|
||||
.unwrap_or_default();
|
||||
let tree_height = r.height.saturating_sub(2) as usize;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue