From 512f597a0f16e5d032fdf419936757c96fa49b4a Mon Sep 17 00:00:00 2001 From: Marco De Araujo Date: Mon, 12 Jan 2026 16:38:06 -0400 Subject: [PATCH] Fix --- src/ui/components/monitor_list.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/components/monitor_list.rs b/src/ui/components/monitor_list.rs index b3a25c2..af74637 100644 --- a/src/ui/components/monitor_list.rs +++ b/src/ui/components/monitor_list.rs @@ -104,12 +104,12 @@ fn render_monitor_table( ) { let max_items = area.height as usize; let items_to_show = min(monitors.len(), max_items); - let index = monitors.len().saturating_sub(max_items.saturating_sub(2)); // 2 = Table header + botton - let monitors = if is_first_half { - &monitors[index..].to_vec() + let index = if is_first_half { + monitors.len().saturating_sub(max_items.saturating_sub(2)) // 2 = Table header + botton } else { - monitors + 0 }; + let monitors = &monitors[index..index + items_to_show.min(monitors.len() - index)]; let header_cells = vec![ "".to_string(),