Allow nested format expansion.
Add automatic-rename-format option allowing automatic rename to use something
other than pane_current_command.
Accept multiple parameters to SM/RM/DECSET/DECRST, based on a diff from Hayaki
Saito.
Assign mouse x/y coords before checking them

When receiving mouse inputs, we should set the x/y coordinates earlier than
we currently do, so that we aren't off-by-one in the case when the statusbar
is at the top of the screen.
Renumber windows: Lookup lastw via window not index

When calling 'movew -r' on a session to reorder the winlinks, ensure when
adding back in the information for the lastw stack that we look up the
winlink based on the window and not its index.

Using the index doesn't make sense here because when comparing it to the old
set, it will never match since the winlink has been renumbered.

Bug reported by Ben Boeckel.
choose-tree: Reset top when toggling items

When choose-tree is told to expand/collapse items (especially when first
rendering collapsed to just show sessions), ensure that in addition to
setting the selected item, that the item itself appears on the bottom of the
screen, rather than off screen.

This was causing rendering glitches when a very small tmux window tried to
render a list of items in choose-tree much larger than itself, and the
selected item appeared off screen, and didn't show the selection until the
selection had wrapped around to the top of the screen.
Clear window->flags when clearing winlinks

When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for that
window, clear the window->flags as well, otherwise sessions may well still
see flags for winlinks long since cleared.

This therfore introduces WINDOW_ALERTFLAGS to help with this.
Remove the barely-used and unnecessary command check() function.
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
+ to TODO.
++ to TODO.
Remove from TODO.
Trivial style and spacing nits.
Define hooks infrasructure

This adds an implementation hooks using a RB tree to store the name of the
hook and the command-list it uses.  These will be accessed via commands to
add/remove hooks.
Convert commands to use prepare()

Hooks need to know the running context of commands so that those hooks run
within the intended client/session/window/pane of the command they're being
run for.
Add man page entry for hooks

This defines a generic HOOKS section, describing a little bit about hooks as
well as the two hooks-specific commands to manipulate/show them.