I don't know why this wouldn't be the right thing to do, can't find a SF
issue... maybe it was on the ML?

This seems a slightly better change.


Index: server-window.c
===================================================================
RCS file: /cvs/src/usr.bin/tmux/server-window.c,v
retrieving revision 1.29
diff -u -p -r1.29 server-window.c
--- server-window.c     14 Feb 2014 12:44:45 -0000      1.29
+++ server-window.c     14 Feb 2014 13:01:58 -0000
@@ -85,13 +85,14 @@ server_window_check_bell(struct session 
                return (0);
        for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
                c = ARRAY_ITEM(&clients, i);
-               if (c == NULL || c->session != s || (c->flags & CLIENT_CONTROL))
+               if (c == NULL || c->session != s || c->flags & CLIENT_CONTROL)
                        continue;
                if (!visual) {
-                       tty_bell(&c->tty);
+                       if (s->curw->window == w || action == BELL_ANY)
+                               tty_bell(&c->tty);
                        continue;
                }
-               if (c->session->curw->window == w)
+               if (s->curw->window == w)
                        status_message_set(c, "Bell in current window");
                else if (action == BELL_ANY)
                        status_message_set(c, "Bell in window %u", wl->idx);



On Thu, Feb 13, 2014 at 11:09:13AM +0000, Thomas Adam wrote:
> On 12 February 2014 22:28, Filip Moc <od...@moc6.cz> wrote:
> > Hi,
> >
> >> I'm not clear what this bit is supposed to fix, can you give an example?
> >
> > Problem is when visual-bell is off and bell-action is set to current
> > - tmux in this case behaves as if bell-action would be set to any.
> > Action and whether window is current must be checked before call of 
> > tty_bell().
> >
> > Older tmux versions did this right.
> > I didn't check but i'm almost certain that this problem came with this:
> > http://sourceforge.net/p/tmux/tmux-code/ci/a401420273490717de3f6fe8f7f0915692be72a3/
> 
> Right---and I recall at the time, that was the right thing to do.
> There was a ticket open with a patch to address this though, but I
> never picked it up, and I don't think this should be fixed anyway.
> I'm sure that was the conclusion we came to.
> 
> -- Thomas Adam

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to