summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-split-window.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2010-01-07 20:02:01 +0000
committernicm <nicm@openbsd.org>2010-01-07 20:02:01 +0000
commitcfa449f5528cc94cf40949f640e2474d36c6fefd (patch)
tree7e5c4f7c40d755ea9795ce52b23edf25f67ecc05 /usr.bin/tmux/cmd-split-window.c
parentChange split-window to accept a pane target (it should be split-pane but (diff)
downloadwireguard-openbsd-cfa449f5528cc94cf40949f640e2474d36c6fefd.tar.xz
wireguard-openbsd-cfa449f5528cc94cf40949f640e2474d36c6fefd.zip
Use the specified pane for size calculations. Doh.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r--usr.bin/tmux/cmd-split-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index f82888355fc..9712a74d594 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.17 2010/01/07 19:47:10 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.18 2010/01/07 20:02:01 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -183,9 +183,9 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx)
size = data->size;
else if (data->percentage != -1) {
if (type == LAYOUT_TOPBOTTOM)
- size = (w->active->sy * data->percentage) / 100;
+ size = (wp->sy * data->percentage) / 100;
else
- size = (w->active->sx * data->percentage) / 100;
+ size = (wp->sx * data->percentage) / 100;
}
hlimit = options_get_number(&s->options, "history-limit");