diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-06 14:29:26 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-06 14:29:26 +1000 |
commit | 1f941163d3a74b03d2fbbb3376f89f11664c36ba (patch) | |
tree | 7b87fed5ffedf5087230777a0498491477aada72 /sway/commands | |
parent | c6a74cb4df7a50138390a37eb031ef8bd35df7fc (diff) |
Fix crash when running "layout toggle"
The argc and argv used in this function are the same ones used by the
layout command itself.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 44ce2970..ef3ec1cb 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c @@ -29,7 +29,7 @@ static enum sway_container_layout get_layout_toggle(int argc, char **argv, enum sway_container_layout layout, enum sway_container_layout prev_split_layout) { // "layout toggle" - if (argc == 0) { + if (argc == 1) { return layout == L_HORIZ ? L_VERT : L_HORIZ; } |