summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream-bd29a48b56.diff
blob: 49f34be778572239afce56b207d329c7acbf4097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
commit bd29a48b56ae649d425fd6939d60f75d79d767da
Author: Nicholas Marriott <nicholas.marriott@gmail.com>
Date:   Wed Mar 6 21:32:39 2024 +0000

    Check for the right flag to fix split-window -p, from Bryan Childs.

diff --git a/cmd-split-window.c b/cmd-split-window.c
index 18df715ef0..82ff22aff0 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;
 	}