summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2024-03-06 21:32:39 +0000
committernicm <nicm>2024-03-06 21:32:39 +0000
commitbd29a48b56ae649d425fd6939d60f75d79d767da (patch)
tree6bb93a0f9275a8c04ab1792b026427b7a87057fd
parent40b97b1715182b0ab0274b0c402b34e2cba98f04 (diff)
Check for the right flag to fix split-window -p, from Bryan Childs.
-rw-r--r--cmd-split-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-split-window.c b/cmd-split-window.c
index 18df715e..82ff22af 100644
--- a/cmd-split-window.c
+++ b/cmd-split-window.c
@@ -94,10 +94,10 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item)
size = -1;
if (args_has(args, 'l')) {
size = args_percentage_and_expand(args, 'l', 0, INT_MAX, curval,
- item, &cause);
+ item, &cause);
} else if (args_has(args, 'p')) {
- size = args_strtonum_and_expand(args, 'l', 0, 100, item,
- &cause);
+ size = args_strtonum_and_expand(args, 'p', 0, 100, item,
+ &cause);
if (cause == NULL)
size = curval * size / 100;
}