Create a new split container when switching a workspace container to split layout

The behavior before 52ce8c8 was to do it regardless of what layout we're
switching to.

Fixes #2846
next
Dan Elkouby 2017-07-30 18:49:42 +03:00
parent 44a6efb5b0
commit c028f0cb17
1 changed files with 1 additions and 1 deletions

View File

@ -1756,7 +1756,7 @@ void con_set_layout(Con *con, layout_t layout) {
con->workspace_layout = ws_layout;
DLOG("Setting layout to %d\n", layout);
con->layout = layout;
} else if (layout == L_STACKED || layout == L_TABBED) {
} else if (layout == L_STACKED || layout == L_TABBED || layout == L_SPLITV || layout == L_SPLITH) {
DLOG("Creating new split container\n");
/* 1: create a new split container */
Con *new = con_new(NULL, NULL);