mirror of
https://github.com/tmux/tmux.git
synced 2026-10-07 02:04:22 +00:00
Move monitor stuff out of control.c into its own file for reuse.
This commit is contained in:
@@ -47,7 +47,7 @@ static void
|
||||
cmd_refresh_client_update_subscription(struct client *tc, const char *value)
|
||||
{
|
||||
char *copy, *split, *name, *what;
|
||||
enum control_sub_type subtype;
|
||||
enum monitor_type subtype;
|
||||
int subid = -1;
|
||||
|
||||
copy = name = xstrdup(value);
|
||||
@@ -63,15 +63,15 @@ cmd_refresh_client_update_subscription(struct client *tc, const char *value)
|
||||
*split++ = '\0';
|
||||
|
||||
if (strcmp(what, "%*") == 0)
|
||||
subtype = CONTROL_SUB_ALL_PANES;
|
||||
subtype = MONITOR_ALL_PANES;
|
||||
else if (sscanf(what, "%%%d", &subid) == 1 && subid >= 0)
|
||||
subtype = CONTROL_SUB_PANE;
|
||||
subtype = MONITOR_PANE;
|
||||
else if (strcmp(what, "@*") == 0)
|
||||
subtype = CONTROL_SUB_ALL_WINDOWS;
|
||||
subtype = MONITOR_ALL_WINDOWS;
|
||||
else if (sscanf(what, "@%d", &subid) == 1 && subid >= 0)
|
||||
subtype = CONTROL_SUB_WINDOW;
|
||||
subtype = MONITOR_WINDOW;
|
||||
else
|
||||
subtype = CONTROL_SUB_SESSION;
|
||||
subtype = MONITOR_SESSION;
|
||||
control_add_sub(tc, name, subtype, subid, split);
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user