mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-26 00:29:46 +01:00
The alerts callback should be fired for bells even if bell-action is
none because it also affects the status line bell indicator (and bell-action does not). Fixes a problem reported by tim@.
This commit is contained in:
parent
fce56c56ef
commit
40fefe2cbc
12
alerts.c
12
alerts.c
@ -77,8 +77,8 @@ alerts_callback(__unused int fd, __unused short events, __unused void *arg)
|
|||||||
int
|
int
|
||||||
alerts_enabled(struct window *w, int flags)
|
alerts_enabled(struct window *w, int flags)
|
||||||
{
|
{
|
||||||
struct session *s;
|
if (flags & WINDOW_BELL)
|
||||||
|
return (1);
|
||||||
if (flags & WINDOW_ACTIVITY) {
|
if (flags & WINDOW_ACTIVITY) {
|
||||||
if (options_get_number(w->options, "monitor-activity"))
|
if (options_get_number(w->options, "monitor-activity"))
|
||||||
return (1);
|
return (1);
|
||||||
@ -87,14 +87,6 @@ alerts_enabled(struct window *w, int flags)
|
|||||||
if (options_get_number(w->options, "monitor-silence") != 0)
|
if (options_get_number(w->options, "monitor-silence") != 0)
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
if (~flags & WINDOW_BELL)
|
|
||||||
return (0);
|
|
||||||
RB_FOREACH(s, sessions, &sessions) {
|
|
||||||
if (!session_has(s, w))
|
|
||||||
continue;
|
|
||||||
if (options_get_number(s->options, "bell-action") != BELL_NONE)
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user