diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-11-12 22:57:07 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-11-12 22:57:07 +0000 |
commit | 0e42ce0d08b8ceb5ed1140e54c5db98f35e052b0 (patch) | |
tree | 8ab4e224ae20d9b6c6186b3ee19993f402a7a01c | |
parent | 43930bcf849c323d2a519206406b4834d43bca8f (diff) |
Add -b to splitw like joinw, from Felix Rosencrantz.
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 9 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index daca7d7b1e8..e4215941c2d 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.53 2014/10/20 23:35:28 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.54 2014/11/12 22:57:06 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -37,8 +37,8 @@ enum cmd_retval cmd_split_window_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_split_window_entry = { "split-window", "splitw", - "c:dF:l:hp:Pt:v", 0, -1, - "[-dhvP] [-c start-directory] [-F format] [-p percentage|-l size] " + "bc:dF:l:hp:Pt:v", 0, -1, + "[-bdhvP] [-c start-directory] [-F format] [-p percentage|-l size] " CMD_TARGET_PANE_USAGE " [command]", 0, cmd_split_window_exec @@ -145,7 +145,8 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq) if (*shell == '\0' || areshell(shell)) shell = _PATH_BSHELL; - if ((lc = layout_split_pane(wp, type, size, 0)) == NULL) { + lc = layout_split_pane(wp, type, size, args_has(args, 'b')); + if (lc == NULL) { cause = xstrdup("pane too small"); goto error; } diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 2ac0c459928..6262a0dd1f1 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.407 2014/11/07 12:28:28 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.408 2014/11/12 22:57:06 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> .\" @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 7 2014 $ +.Dd $Mdocdate: November 12 2014 $ .Dt TMUX 1 .Os .Sh NAME @@ -1757,7 +1757,7 @@ is given and the selected window is already the current window, the command behaves like .Ic last-window . .It Xo Ic split-window -.Op Fl dhvP +.Op Fl bdhvP .Op Fl c Ar start-directory .Oo Fl l .Ar size | @@ -1781,6 +1781,10 @@ and .Fl p options specify the size of the new pane in lines (for vertical split) or in cells (for horizontal split), or as a percentage, respectively. +The +.Fl b +option causes the new pane to be created to the left of or above +.Ar target-pane . All other options have the same meaning as for the .Ic new-window command. |