Like linefeed, don't set the scroll region for reverse index unless it will be
needed.
While here, also tidy up a couple of long lines and remove an extraneous blank.
Set the current window pointer to NULL when killing a winlink that is to be
replaced with link-window -k. This prevents it being pushed onto the last
window stack and causing a use-after-free.
Only took me an hour to find this :-/...
Add a pipe-pane command to allow a pane to be piped to a shell command, for
example:
pipe-pane 'cat >~/out'
No arguments stops outputing and closes the pipe; the -o flag toggles a pipe
and on and off (useful for key bindings).
Suggested by espie@.
Clean up by introducing a wrapper struct for mouse clicks rather than passing
three u_chars around.
As a side-effect this fixes incorrectly rejecting high cursor positions
(because it was comparing them as signed char), reported by Tom Doherty.
Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.
This brings several advantages:
- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
only be run once.
run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.
New option, mouse-select-pane. If on, the mouse may be used to select the
current pane.
Suggested by sthen@ and also by someone else ages ago who I have forgotten.
Add "grouped sessions" which have independent name, options, current window and
so on but where the linked windows are synchronized (ie creating, killing
windows and so on are mirrored between the sessions). A grouped session may be
created by passing -t to new-session.
Had this around for a while, tested by a couple of people.
Support for individual session idle time locking. May be enabled by turning off
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.
This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.
Diff/idea largely from Thomas Adam, tweaked by me.
Instead of passing a struct pollfd ** around through various functions, build
them into a tree and then convert into a flat poll array before and after poll.
This adds a little code but should reduce annoying problems with ordering when
adding new things that also need to be polled.
Add a simple synchronize-panes window option: when set, all input to any pane
that is part of the window is also sent to all other panes in the same
window. Suggested by several, most recently Tomasz Pajor.
Be less aggressive about turning the cursor off, only explicitly turn it off
when tmux is redrawing, otherwise leave in the state set by the application.