Bugfix: don’t invalidate layout upon invalid 'layout toggle' params (#2965)

fixes #2903
This commit is contained in:
Michael Stapelberg
2017-09-18 16:36:57 +02:00
committed by Michael Stapelberg
parent 910bcd68bc
commit 0b6d851d7c
2 changed files with 32 additions and 1 deletions

View File

@ -1841,7 +1841,9 @@ void con_toggle_layout(Con *con, const char *toggle_mode) {
}
}
con_set_layout(con, new_layout);
if (new_layout != L_DEFAULT) {
con_set_layout(con, new_layout);
}
} else if (strcasecmp(toggle_mode, "all") == 0 || strcasecmp(toggle_mode, "default") == 0) {
if (parent->layout == L_STACKED)
con_set_layout(con, L_TABBED);