diff --git i/src/window.c w/src/window.c
index 7efe7b164..e28955d1b 100644
--- i/src/window.c
+++ w/src/window.c
@@ -2967,10 +2967,18 @@ win_altframe(
if (frp->fr_next == NULL)
return frp->fr_prev;
+ // By default the next window will get the space that was abandoned by this window
target_fr = frp->fr_next;
other_fr = frp->fr_prev;
- if (p_spr || p_sb)
- {
+
+ // If this is part of a column of windows, and splitbelow is true then the previous will get the space
+ if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_COL && p_sb) {
+ target_fr = frp->fr_prev;
+ other_fr = frp->fr_next;
+ }
+
+ // If this is part of a row of windows, and splitright is true then the previous will get the space
+ if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW && p_spr) {
target_fr = frp->fr_prev;
other_fr = frp->fr_next;