mirror of
https://github.com/tmux/tmux.git
synced 2026-10-07 02:04:22 +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:
15
options.c
15
options.c
@@ -56,6 +56,7 @@ struct options_entry {
|
||||
|
||||
int cached;
|
||||
struct style style;
|
||||
void *monitor_data;
|
||||
|
||||
RB_ENTRY(options_entry) entry;
|
||||
};
|
||||
@@ -354,6 +355,8 @@ options_remove(struct options_entry *o)
|
||||
options_array_clear(o);
|
||||
else
|
||||
options_value_free(o, &o->value);
|
||||
if (o->monitor_data != NULL)
|
||||
notify_monitor_free(o->monitor_data);
|
||||
RB_REMOVE(options_tree, &oo->tree, o);
|
||||
free((void *)o->name);
|
||||
free(o);
|
||||
@@ -371,6 +374,18 @@ options_owner(struct options_entry *o)
|
||||
return (o->owner);
|
||||
}
|
||||
|
||||
void *
|
||||
options_get_monitor_data(struct options_entry *o)
|
||||
{
|
||||
return (o->monitor_data);
|
||||
}
|
||||
|
||||
void
|
||||
options_set_monitor_data(struct options_entry *o, void *data)
|
||||
{
|
||||
o->monitor_data = data;
|
||||
}
|
||||
|
||||
const struct options_table_entry *
|
||||
options_table_entry(struct options_entry *o)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user