Add selectp -T to set pane title.

This commit is contained in:
nicm
2017-09-02 17:51:54 +00:00
parent 6abfd9b8ff
commit f4848b437f
2 changed files with 21 additions and 10 deletions

View File

@ -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);