diff options
author | nicm <nicm> | 2020-07-24 07:05:37 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-07-24 07:05:37 +0000 |
commit | d329b035cee47d968a8c93b5cbd8fde879ce6f0d (patch) | |
tree | 723257e3f0130e238614748461d80b13f75dc8d3 | |
parent | 112b0f417c43e3f9ba7f5aa9df2e49dfdddfc225 (diff) | |
download | rtmux-d329b035cee47d968a8c93b5cbd8fde879ce6f0d.tar.gz rtmux-d329b035cee47d968a8c93b5cbd8fde879ce6f0d.tar.bz2 rtmux-d329b035cee47d968a8c93b5cbd8fde879ce6f0d.zip |
Add a hook when the pane title changed.
-rw-r--r-- | cmd-select-pane.c | 1 | ||||
-rw-r--r-- | input.c | 3 | ||||
-rw-r--r-- | options-table.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/cmd-select-pane.c b/cmd-select-pane.c index b0c78d74..30529722 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -198,6 +198,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) if (args_has(args, 'T')) { title = format_single_from_target(item, args_get(args, 'T')); if (screen_set_title(&wp->base, title)) { + notify_pane("pane-title-changed", wp); server_redraw_window_borders(wp->window); server_status_window(wp->window); } @@ -1867,6 +1867,7 @@ input_csi_dispatch_winops(struct input_ctx *ictx) case 2: screen_pop_title(sctx->s); if (wp != NULL) { + notify_pane("pane-title-changed", wp); server_redraw_window_borders(wp->window); server_status_window(wp->window); } @@ -2261,6 +2262,7 @@ input_exit_osc(struct input_ctx *ictx) case 0: case 2: if (screen_set_title(sctx->s, p) && wp != NULL) { + notify_pane("pane-title-changed", wp); server_redraw_window_borders(wp->window); server_status_window(wp->window); } @@ -2326,6 +2328,7 @@ input_exit_apc(struct input_ctx *ictx) log_debug("%s: \"%s\"", __func__, ictx->input_buf); if (screen_set_title(sctx->s, ictx->input_buf) && wp != NULL) { + notify_pane("pane-title-changed", wp); server_redraw_window_borders(wp->window); server_status_window(wp->window); } diff --git a/options-table.c b/options-table.c index 54bdadba..95d865ce 100644 --- a/options-table.c +++ b/options-table.c @@ -1121,6 +1121,7 @@ const struct options_table_entry options_table[] = { OPTIONS_TABLE_PANE_HOOK("pane-focus-out", ""), OPTIONS_TABLE_PANE_HOOK("pane-mode-changed", ""), OPTIONS_TABLE_PANE_HOOK("pane-set-clipboard", ""), + OPTIONS_TABLE_PANE_HOOK("pane-title-changed", ""), OPTIONS_TABLE_HOOK("session-closed", ""), OPTIONS_TABLE_HOOK("session-created", ""), OPTIONS_TABLE_HOOK("session-renamed", ""), |