In order that people can use formats like #D in #() in the status line
authornicm <nicm@openbsd.org>
Mon, 1 May 2017 12:20:55 +0000 (12:20 +0000)
committernicm <nicm@openbsd.org>
Mon, 1 May 2017 12:20:55 +0000 (12:20 +0000)
commitd559dd45c594cdabf93a350fe402dc4fa248c88f
treeb0a025e4e76ef5226af8bf3872d669269ab10e68
parent3a5c18ee5eeebeca206fcaa1ff85641b3adb5185
In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.
17 files changed:
usr.bin/tmux/cfg.c
usr.bin/tmux/cmd-display-message.c
usr.bin/tmux/cmd-list-buffers.c
usr.bin/tmux/cmd-list-clients.c
usr.bin/tmux/cmd-list-keys.c
usr.bin/tmux/cmd-list-panes.c
usr.bin/tmux/cmd-list-sessions.c
usr.bin/tmux/cmd-list-windows.c
usr.bin/tmux/cmd-pipe-pane.c
usr.bin/tmux/cmd-queue.c
usr.bin/tmux/format.c
usr.bin/tmux/names.c
usr.bin/tmux/screen-redraw.c
usr.bin/tmux/server-client.c
usr.bin/tmux/status.c
usr.bin/tmux/tmux.h
usr.bin/tmux/window-choose.c