From 64ee9b6e0d30f3207b84e1ccd2612e587dea51e1 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 1 Jan 2026 13:10:51 -0800 Subject: [PATCH] fix(wm): consider window count when calculating scrolling column width This commit fixes the stupidest of stupid bugs. Column width calculations on the Scrolling layout should take the number of windows into account, especially when lower than the configured column count. --- komorebi/src/core/arrangement.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komorebi/src/core/arrangement.rs b/komorebi/src/core/arrangement.rs index 1c1d5850..f69b9cb3 100644 --- a/komorebi/src/core/arrangement.rs +++ b/komorebi/src/core/arrangement.rs @@ -43,7 +43,7 @@ impl Arrangement for DefaultLayout { .and_then(|o| o.scrolling.map(|s| s.columns)) .unwrap_or(3); - let column_width = area.right / column_count as i32; + let column_width = area.right / column_count.min(len) as i32; let mut layouts = Vec::with_capacity(len); match len {