diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-11-15 23:19:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-11-15 23:19:52 +0000 |
commit | 602f7427acffff822aef52008f38d3af8430a91b (patch) | |
tree | 5f04cc477de4dda8e170133b7a4e919db411910e /usr.bin/tmux/cmd-split-window.c | |
parent | 83daf11716da1e22d551735ace9d4ee96e00255e (diff) |
Make window_pane_index work the same as window_index, from Ben Boeckel.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index e2f1591c959..05d9815af08 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.24 2011/08/30 09:18:52 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.25 2011/11/15 23:19:51 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -140,7 +140,8 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx) environ_free(&env); if (args_has(args, 'P')) { - paneidx = window_pane_index(wl->window, new_wp); + if (window_pane_index(new_wp, &paneidx) != 0) + fatalx("index not found"); ctx->print(ctx, "%s:%u.%u", s->name, wl->idx, paneidx); } return (0); |