The point of setting TMUX_TMPDIR is to then make any labels from -L go to
that directory. In the case of makesocketpath() with no TMUX_TMPDIR set,
would set both the path and the default socket to a file. The checking of
the permissions on the file worked fine in that case, but when TMUX_TMPDIR
is set, won't work on a directory.
This fixes the problem by ensuring the check on the permissions is performed
on directories only.
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.
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.
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.
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.
happen when a window is in two sessions - it isn't destroyed immediately when
the pane goes away but is left until the last session is destroyed. Fixes
problems with grouped sessions reported by Daniel Ralston.
the server and fd passing is not necessary. Needs some ifdefs unfortunately but
no way around that and some of them can go next time we're willing to do a
protocol bump. Patch from J Raynor jxraynor at gmail dot com.