From: nicm Date: Wed, 6 Mar 2024 21:32:39 +0000 (+0000) Subject: Check for the right flag to fix split-window -p, from Bryan Childs. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e9310faa4406ee78598aa16471e37b7c7b544fe6;p=openbsd Check for the right flag to fix split-window -p, from Bryan Childs. --- diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index f961caf474a..d58bded1f93 100644 --- a/usr.bin/tmux/cmd-split-window.c +++ b/usr.bin/tmux/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.113 2022/06/07 10:02:19 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.114 2024/03/06 21:32:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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; }