mirror of
https://github.com/gitui-org/gitui.git
synced 2026-10-12 02:14:16 +00:00
safety first
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user