mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-09-11 11:05:39 +03:00
Fix divide by zero error
This commit is contained in:
parent
371d572d50
commit
871a4c79aa
@ -178,7 +178,7 @@ fn draw_table<B: Backend>(f: &mut Frame<B>, rect: Rect, app: &app::App, hb: &Han
|
||||
dir.nodes
|
||||
.iter()
|
||||
.enumerate()
|
||||
.skip(height * (dir.focus / height))
|
||||
.skip(height * (dir.focus / height.max(1)))
|
||||
.take(height)
|
||||
.map(|(index, node)| {
|
||||
let is_focused = dir.focus == index;
|
||||
|
Loading…
Reference in New Issue
Block a user