aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 15bd89c..eb56eb2 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -348,6 +348,19 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Select
case OPTION_CHANGE_256COLORS:
vis->change_colors = toggle ? !vis->change_colors : arg.b;
break;
+ case OPTION_LAYOUT: {
+ enum UiLayout layout;
+ if (strcmp("h", arg.s) == 0) {
+ layout = UI_LAYOUT_HORIZONTAL;
+ } else if (strcmp("v", arg.s) == 0) {
+ layout = UI_LAYOUT_VERTICAL;
+ } else {
+ vis_info_show(vis, "Invalid layout `%s', expected 'h' or 'v'", arg.s);
+ return false;
+ }
+ windows_arrange(vis, layout);
+ break;
+ }
default:
if (!opt->func)
return false;