mirror of
https://github.com/tmate-io/tmate.git
synced 2025-06-21 18:11:22 +02:00
All kill-session -C to clear alerts in all windows, suggested by Aaron
U'Ren.
This commit is contained in:
parent
4e3015a892
commit
9fd3318dd8
@ -31,8 +31,8 @@ enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmd_q *);
|
|||||||
|
|
||||||
const struct cmd_entry cmd_kill_session_entry = {
|
const struct cmd_entry cmd_kill_session_entry = {
|
||||||
"kill-session", NULL,
|
"kill-session", NULL,
|
||||||
"at:", 0, 0,
|
"aCt:", 0, 0,
|
||||||
"[-a] " CMD_TARGET_SESSION_USAGE,
|
"[-aC] " CMD_TARGET_SESSION_USAGE,
|
||||||
0,
|
0,
|
||||||
cmd_kill_session_exec
|
cmd_kill_session_exec
|
||||||
};
|
};
|
||||||
@ -42,11 +42,18 @@ cmd_kill_session_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
{
|
{
|
||||||
struct args *args = self->args;
|
struct args *args = self->args;
|
||||||
struct session *s, *sloop, *stmp;
|
struct session *s, *sloop, *stmp;
|
||||||
|
struct winlink *wl;
|
||||||
|
|
||||||
if ((s = cmd_find_session(cmdq, args_get(args, 't'), 0)) == NULL)
|
if ((s = cmd_find_session(cmdq, args_get(args, 't'), 0)) == NULL)
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
|
|
||||||
if (args_has(args, 'a')) {
|
if (args_has(args, 'C')) {
|
||||||
|
RB_FOREACH(wl, winlinks, &s->windows) {
|
||||||
|
wl->window->flags &= ~WINDOW_ALERTFLAGS;
|
||||||
|
wl->flags &= ~WINLINK_ALERTFLAGS;
|
||||||
|
}
|
||||||
|
server_redraw_session(s);
|
||||||
|
} else if (args_has(args, 'a')) {
|
||||||
RB_FOREACH_SAFE(sloop, sessions, &sessions, stmp) {
|
RB_FOREACH_SAFE(sloop, sessions, &sessions, stmp) {
|
||||||
if (sloop != s) {
|
if (sloop != s) {
|
||||||
server_destroy_session(sloop);
|
server_destroy_session(sloop);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user