From 9e35bda45d94019f1b4d922abdd11ae922f73438 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Wed, 12 Feb 2025 00:30:54 +0300 Subject: [PATCH] scrollbar fix --- src/chat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index 84f67a6..cb01e17 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -93,7 +93,7 @@ pub fn print_console(ctx: Arc, messages: Vec, input: &str) -> R let (width, height) = (width as usize, height as usize); let scroll = ctx.scroll.load(Ordering::SeqCst); - let scroll = (1f64 - scroll as f64 / messages.len() as f64) * (height - 1) as f64; + let scroll = (1f64 - scroll as f64 / messages.len() as f64) * (height) as f64; let scroll = scroll as usize; let text = format!(