From 4919872e1a4cd21f55235d2d60efea9bb7ec1135 Mon Sep 17 00:00:00 2001 From: Javier Portillo <17260001+javierportillo@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:49:18 -0600 Subject: [PATCH] fix(wm): adds special case for grid stacks to the right --- komorebi/src/window_manager.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index 7ae94794..72b4e508 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -1450,7 +1450,9 @@ impl WindowManager { anyhow!("this is not a valid direction from the current position") })?; - let adjusted_new_index = if new_idx > current_container_idx { + let adjusted_new_index = if new_idx > current_container_idx + && !matches!(workspace.layout(), Layout::Default(DefaultLayout::Grid)) + { new_idx - 1 } else { new_idx