diff options
author | 2018-03-16 15:15:39 +0000 | |
---|---|---|
committer | 2018-03-16 15:15:39 +0000 | |
commit | e7b8083a15303413f4e257b6a19e5040981d1a67 (patch) | |
tree | a68ef4ead709c4d8f2ebcd033207f3d8fd4ea97e /usr.bin/tmux/cmd-split-window.c | |
parent | Style message about bad input encoding of em-dashes as -- instead of \(em. (diff) | |
download | wireguard-openbsd-e7b8083a15303413f4e257b6a19e5040981d1a67.tar.xz wireguard-openbsd-e7b8083a15303413f4e257b6a19e5040981d1a67.zip |
Insert full size panes at the right position, from KOIE Hidetaka in
GitHub issue 1284.
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index 426a8db4b49..6aa6cea2f0c 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.88 2018/03/01 12:53:08 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.89 2018/03/16 15:15:39 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -64,7 +64,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) const char *cmd, *path, *shell, *template, *tmp; char **argv, *cause, *new_cause, *cp, *cwd; u_int hlimit; - int argc, size, percentage; + int argc, size, percentage, before; enum layout_type type; struct layout_cell *lc; struct environ_entry *envent; @@ -96,6 +96,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) type = LAYOUT_TOPBOTTOM; if (args_has(args, 'h')) type = LAYOUT_LEFTRIGHT; + before = args_has(args, 'b'); size = -1; if (args_has(args, 'l')) { @@ -125,13 +126,12 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) if (*shell == '\0' || areshell(shell)) shell = _PATH_BSHELL; - lc = layout_split_pane(wp, type, size, args_has(args, 'b'), - args_has(args, 'f')); + lc = layout_split_pane(wp, type, size, before, args_has(args, 'f')); if (lc == NULL) { cause = xstrdup("pane too small"); goto error; } - new_wp = window_add_pane(w, wp, args_has(args, 'b'), hlimit); + new_wp = window_add_pane(w, wp, before, args_has(args, 'f'), hlimit); layout_make_leaf(lc, new_wp); path = NULL; |