From: Dan Elkouby Date: Thu, 12 Oct 2017 20:44:25 +0000 (+0300) Subject: Default to L_SPLITH with toggle split when last_split_layout hasn't been initialized X-Git-Tag: 4.15~50^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F2849%2Fhead;p=i3%2Fi3 Default to L_SPLITH with toggle split when last_split_layout hasn't been initialized --- diff --git a/src/con.c b/src/con.c index 88d1e744..1de91d00 100644 --- a/src/con.c +++ b/src/con.c @@ -1848,6 +1848,10 @@ void con_toggle_layout(Con *con, const char *toggle_mode) { * change to the opposite split layout. */ if (parent->layout != L_SPLITH && parent->layout != L_SPLITV) { layout = parent->last_split_layout; + /* In case last_split_layout was not initialized… */ + if (layout == L_DEFAULT) { + layout = L_SPLITH; + } } else { layout = (parent->layout == L_SPLITH) ? L_SPLITV : L_SPLITH; }