Fix BELL_NONE which had been broken in some code reorganisation or other

also don't redraw unnecessarily. From Seiji Ohashi.
pull/1/head
Nicholas Marriott 2012-10-25 11:16:53 +00:00
parent 596e9d8068
commit 18236c1c1b
1 changed files with 3 additions and 1 deletions

View File

@ -75,12 +75,14 @@ server_window_check_bell(struct session *s, struct winlink *wl)
if (s->curw != wl || s->flags & SESSION_UNATTACHED)
wl->flags |= WINLINK_BELL;
if (s->flags & SESSION_UNATTACHED)
return (1);
return (0);
if (s->curw->window == wl->window)
w->flags &= ~WINDOW_BELL;
visual = options_get_number(&s->options, "visual-bell");
action = options_get_number(&s->options, "bell-action");
if (action == BELL_NONE)
return (0);
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
c = ARRAY_ITEM(&clients, i);
if (c == NULL || c->session != s)