When using the command 'select-pane -T", ensure this is run via the
format logic, so that things like 'selectp -T '#{pane_current_command}'
works as expected.
---
cmd-select-pane.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/cmd-select-pane.c b/cmd-select-pane.c
index a7fb4428..b1074652 100644
--- a/cmd-select-pane.c
+++ b/cmd-select-pane.c
@@ -17,6 +17,7 @@
*/
#include <sys/types.h>
+#include <stdlib.h>
#include "tmux.h"
@@ -57,10 +58,12 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item
*item)
{
struct args *args = self->args;
struct cmd_find_state *current = &item->shared->current;
+ struct client *c = cmd_find_client(item, NULL, 1);
struct winlink *wl = item->target.wl;
struct window *w = wl->window;
struct session *s = item->target.s;
struct window_pane *wp = item->target.wp, *lastwp, *markedwp;
+ char *pane_title;
const char *style;
if (self->entry == &cmd_last_pane_entry || args_has(args, 'l')) {
@@ -148,8 +151,11 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item
*item)
}
if (args_has(self->args, 'T')) {
- screen_set_title(&wp->base, args_get(self->args, 'T'));
- server_status_window(wp->window);
+ pane_title = format_single(item, args_get(self->args, 'T'),
+ c, s, wl, wp);
+ screen_set_title(&wp->base, pane_title);
+ server_status_window(wp->window);
+ free(pane_title);
}
if (wp == w->active)
--
2.15.0.rc1
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.