diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-09-02 17:51:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-09-02 17:51:55 +0000 |
commit | 7bb71fbbb0baba64a35869ecc8701cd388dd1d52 (patch) | |
tree | 9f6f66f906384e00f736d0d19fb63ad4cc0e101f /usr.bin/tmux/cmd-select-pane.c | |
parent | 8f6057df9ae6f21acac4c0e3ee1f3b6263c92c75 (diff) |
Add selectp -T to set pane title.
Diffstat (limited to 'usr.bin/tmux/cmd-select-pane.c')
-rw-r--r-- | usr.bin/tmux/cmd-select-pane.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c index 9e76625bf0c..f3039b1a0fd 100644 --- a/usr.bin/tmux/cmd-select-pane.c +++ b/usr.bin/tmux/cmd-select-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-pane.c,v 1.40 2017/08/30 10:33:57 nicm Exp $ */ +/* $OpenBSD: cmd-select-pane.c,v 1.41 2017/09/02 17:51:54 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -30,8 +30,8 @@ const struct cmd_entry cmd_select_pane_entry = { .name = "select-pane", .alias = "selectp", - .args = { "DdegLlMmP:Rt:U", 0, 0 }, - .usage = "[-DdegLlMmRU] [-P style] " CMD_TARGET_PANE_USAGE, + .args = { "DdegLlMmP:RT:t:U", 0, 0 }, + .usage = "[-DdegLlMmRU] [-P style] [-T title] " CMD_TARGET_PANE_USAGE, .target = { 't', CMD_FIND_PANE, 0 }, @@ -147,6 +147,11 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) return (CMD_RETURN_NORMAL); } + if (args_has(self->args, 'T')) { + screen_set_title(&wp->base, args_get(self->args, 'T')); + server_status_window(wp->window); + } + if (wp == w->active) return (CMD_RETURN_NORMAL); server_unzoom_window(wp->window); |