| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Add mode keys to move the cursor to the top, middle and bottom of the screen.
H/M/L in vi mode and M-R/M-r in emacs (bottom of screen not bound in emacs).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When drawing lines that have wrapped naturally, don't force a newline but
permit them to wrap naturally again. This allows terminals that use this to
guess where lines start and end for eg mouse selecting (like xterm) to work
correctly.
This was another long-standing issue raised by several people over the last
while.
Thanks to martynas@ for much testing. This was not trivial to get right so
bringing it in for wider testing and adn to fix any further glitches in-tree.
|
|
|
|
|
|
|
|
|
|
| |
When backspace is received at the beginning of a line and the previous line was
wrapped, move the cursor back up to the end of the previous line.
Another one of the forgotten persons requested this quite a while ago (I need
to start noting names on todo items...) when it was quite hard to
implement. Now it is easy and I don't see it can do any harm, so hey presto...
|
|
|
|
|
|
|
| |
Use relative cursor movement instead of absolute when possible and when
supported by the terminal to reduce the size of the output data (generally
about 10-20%).
|
|
|
|
|
| |
Similarly add a tty_cursor_pane function to tidy up most of the calls.
|
|
|
|
|
| |
_absolute is redundant, just use tty_region.
|
|
|
|
|
|
| |
Cleanup: use two functions for region setting, one for absolute and one inside
pane.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
| |
Collect status from dead jobs and don't invoke the callback until both
all input (the socket is closed) and status is available.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Put all jobs on a global all_jobs list and use that in server.c instead of
running through all the clients.
|
|
|
|
|
| |
Split list-panes off from list-windows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The UTF-8 detection idea doesn't work and I am reasonably happy with the
current methods, so remove the (already #ifdef 0'd) code.
|
|
|
|
|
|
|
| |
Remove scroll mode which is now redundant, copy mode should be used instead.
The = key binding now does nothing.
|
|
|
|
|
|
|
| |
Make C-Up and C-Down in copy mode scroll the screen up and down one line
without moving the cursor, like Up and Down in scroll mode (which will shortly
disappear).
|
|
|
|
|
|
|
|
| |
If no target client is specified to commands which accept one, try to guess the
current client, in a similar manner to how sessions already work: if the
current session can be established and has only one client, use that; otherwise
use the most recently created client.
|
|
|
|
|
|
| |
New lock-client and lock-session commands to lock an individual client or all
clients attached to a session respectively.
|
|
|
|
|
| |
Remove PROMPT_HIDDEN code which is now unused.
|
|
|
|
|
|
|
|
|
| |
Support -c like sh(1) to execute a command, useful when tmux is a login
shell. Suggested by halex@.
This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the internal tmux locking and instead detach each client and run the
command specified by a new option "lock-command" (by default "lock -np") in
each client.
This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.
Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.
This is the third protocol version change so again it is best to stop the tmux
server before upgrading.
|
|
|
|
|
|
|
|
|
| |
Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the client
into the server.
This is another (the second of four) protocol version changes coming this
morning, so again the server should be killed before upgrading.
|
|
|
|
|
|
|
|
|
|
|
| |
Don't attempt to open() the tty path, rely on the client sending its stdin fd
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init
instead of tty_open to prevent them leaking into child processes if any are
created between the two calls.
This bumps the protocol version, so the tmux server should be killed before
upgrading.
|
|
|
|
|
|
|
|
|
|
| |
Permit multiple prefix keys to be defined, separated by commas, for example:
set -g prefix ^a,^b
Any key in the list acts as the prefix. The send-prefix command always sends
the first key in the list.
|
|
|
|
|
| |
Use option print function for info messages as well.
|
|
|
|
|
| |
Move common code from show-options and show-window-options into a function.
|
|
|
|
|
| |
Drop tiny union from option struct.
|
|
|
|
|
| |
Key options were implemented as a number so these struct members are unused.
|
|
|
|
|
|
| |
run-shell command to run a shell command without opening a window, sending
stdout to output mode.
|
|
|
|
|
|
| |
Move some common and untidy code for window link/unlink into generic functions
instead of duplicating it in move/link window..
|
|
|
|
|
|
|
|
|
|
|
| |
==
Rather than constructing an entire termios struct from ttydefaults.h, just let
forkpty do it and then alter the bits that should be changed after fork. A
little neater and more portable.
==
This should fix problems caused by glibc's broken ttydefaults.h file.
|
|
|
|
|
| |
Nuke unused server_client_index function, pointed out by martynas@.
|
|
|
|
|
| |
Tidy some common code for destroying sessions into a new function.
|
|
|
|
|
|
| |
Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".
|
|
|
|
|
|
| |
Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.
|
|
|
|
|
|
| |
Give each paste buffer a size member instead of requiring them to be
zero-terminated.
|
|
|
|
|
|
| |
Permit embedded colour and attributes in status-left and status-right using new
#[] special characters, for example #[fg=red,bg=blue,blink].
|
|
|
|
|
|
| |
Accept -l to make it easier for people who use tmux as a login shell to use
$SHELL. Originally from martynas@, tweaked by me.
|
|
|
|
|
|
| |
When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.
|
|
|
|
|
|
| |
Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
Olavi Niemitalo.
|
|
|
|
|
|
|
| |
use the error and exit on MSG_EXIT (it was being handled in the default
case). Undo the last change, move the errstr check into the MSG_EXIT case, and
add a comment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.
The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.
Based on a diff from martynas@, changed by me to be a session option rather
than a window option.
|
|
|
|
|
|
|
| |
Add a new display-panes command, with two options (display-panes-colour and
display-panes-time), which displays a visual indication of the number of each
pane.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a choose-client command and extend choose-{session,window} to accept a
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.
The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).
|
|
|
|
|
| |
gcc2 doesn't understand attributes on function pointers.
|
|
|
|
|
|
|
| |
When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
|