mirror of
https://github.com/tmux/tmux.git
synced 2026-07-29 03:37:52 +00:00
Add set-hook -B install a subscription like in control mode.
Subscriptions are formats which are checked once a second and if changed invoke a hook. show-hooks -B lists.
This commit is contained in:
@@ -702,7 +702,7 @@ control_start(struct client *c)
|
||||
RB_INIT(&cs->panes);
|
||||
TAILQ_INIT(&cs->pending_list);
|
||||
TAILQ_INIT(&cs->all_blocks);
|
||||
cs->subs = monitor_create(c, control_sub_change, NULL);
|
||||
cs->subs = monitor_create_client(c, control_sub_change, NULL);
|
||||
|
||||
cs->read_event = bufferevent_new(c->fd, control_read_callback,
|
||||
control_write_callback, control_error_callback, c);
|
||||
@@ -776,7 +776,7 @@ control_add_sub(struct client *c, const char *name, enum monitor_type type,
|
||||
{
|
||||
struct control_state *cs = c->control_state;
|
||||
|
||||
monitor_add(cs->subs, name, type, id, format);
|
||||
monitor_add(cs->subs, name, type, id, format, MONITOR_NOTIFY_INITIAL);
|
||||
}
|
||||
|
||||
/* Remove a subscription. */
|
||||
|
||||
Reference in New Issue
Block a user