From 7b23a1a0d89a1dea7a1509efba0328ca6b822638 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 5 Dec 2018 21:46:02 -0500 Subject: [PATCH] cmd_split: flatten when possible --- sway/commands/split.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/commands/split.c b/sway/commands/split.c index ed106a86..85a53a55 100644 --- a/sway/commands/split.c +++ b/sway/commands/split.c @@ -18,6 +18,10 @@ static struct cmd_results *do_split(int layout) { workspace_split(ws, layout); } + if (con->parent->parent) { + container_flatten(con->parent->parent); + } + arrange_workspace(ws); return cmd_results_new(CMD_SUCCESS, NULL, NULL);