mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
Do not silently make a session monitor if the target is unknown, GitHub
issue 5575 from zzchun12826 at gmail dot com.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: monitor.c,v 1.7 2026/07/27 19:15:58 nicm Exp $ */
|
/* $OpenBSD: monitor.c,v 1.8 2026/09/07 10:15:25 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -614,8 +614,10 @@ monitor_parse(const char *value, char **name, enum monitor_type *type, int *id,
|
|||||||
*type = MONITOR_ALL_WINDOWS;
|
*type = MONITOR_ALL_WINDOWS;
|
||||||
else if (sscanf(what, "@%d", id) == 1 && *id >= 0)
|
else if (sscanf(what, "@%d", id) == 1 && *id >= 0)
|
||||||
*type = MONITOR_WINDOW;
|
*type = MONITOR_WINDOW;
|
||||||
else
|
else if (*what == '\0')
|
||||||
*type = MONITOR_SESSION;
|
*type = MONITOR_SESSION;
|
||||||
|
else
|
||||||
|
goto fail;
|
||||||
*name = xstrdup(copy);
|
*name = xstrdup(copy);
|
||||||
*format = xstrdup(split);
|
*format = xstrdup(split);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user