certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.
This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).
After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.
the xterm escape sequence for the purpose (if xterm is configured to
allow it).
Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.
using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:
$ printf '\033Ptmux;\033\033]12;red\007\033\\'
Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.
and supports larger terminals than the older way.
If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.
With help and based on code from hsim at gmx.li.
be and I can't find it, but the flag itself is a useless optimisation
that only applies to automatic-resize windows, so just dispose of it
entirely.
Fixes problems reported by Nicholas Riley.
terminals (I'm looking at you, putty) which disable the vt100 ACS mode
switching sequences in UTF-8 mode.
Also on terminals without ACS at all, use ASCII equivalents where
obvious.
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.
This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.
starting tmux from .xinitrc.
One of the very few things the server relies on the client for now is to
pass through a message on SIGWINCH, but there is a condition where
potentially a SIGWINCH may be lost during the transition from unattached
(main.c) to attached (client.c). So trigger a size change immediately
after the client installs its SIGWINCH handler.
Also, when the terminal is resized, reset the scroll region and cursor
position. Previously, we were clearing our saved idea of these, but in
fact some terminals do not reset them on resize, so this caused problems
during redraw.
While here make a resize to the same size not cause a redraw and rename
the tmux.out output log file to include the tmux PID.
in copy mode.
Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).
values can be stored in the cached terminal attributes rather than the
requested (untranslated) values. Prevents tmux clearing and setting the
attributes for every character when using aixterm colours.
on Sun consoles (TERM=sun or sun-color), even if there appear to still be
problems on some boxes (my Blade 100 is fine but edd's Blade 1000 shows odd
screen corruption).
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.
This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.
meant to be default, so rewrite the code to move this outside, move setting
colours before attributes and generally clean up.
Tested by sthen@, fixes problems he was seeing with mutt and should fix some
existing problems with (rarely) lost attributes.
Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.
Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.
scroll region (which moves the cursor to 0,0). This means that if the cursor
was at the edge of the screen, any further output after scroll region change
incorrectly causes a line wrap. Add a workaround to move the cursor to position
0 if it is at the screen edge before changing scroll region.
Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.
Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.
Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the
UTF-8 cell data size to 9 and alter the code to allow this.
Also break off the combining code into a separate function, handle any further
combining beyond the buffer size by replacing the character with _s, and when
redrawing the UTF-8 character don't assume the first part has just been
printed, redraw the entire line.
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.
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.
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.
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.
clients, so make it const.
Also fix an actual modification which caused a hang when a session was
connected to multiple terminals at least one of which was missing ich/ich1.
have the server use that rather than reopening the tty. If the fd isn't given,
use the old behaviour (so no need for a version change).
This allows tmux to be used as the shell, so also change so that when working
out the command to execute if default-command is empty (the default), tmux will
try not execute itself.
- a two-dimensional array of cells;
- a two-dimensional array of utf8 data;
- an array of line lengths.
Now it is a single array of a new struct grid_line each of which represents a
line and containts the length and an array of cells and an array of utf8 data.
This will make it easier to add additional per-line members, such as flags.
background by setting or clearing the reverse attribute.
This makes a few applications which don't use the reverse attribute themselves
a little happier, and allows the status, message and mode options to have
default attributes and fg/bg options that work as expected when set as reverse.
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.
Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).
normal eight-bit output is wrong, separate it into a different function. Fixes
spacing when mixing UTF-8 with some escape sequences, notably the way w3m does
it.
terminal to be switched between several different windows and programs
displayed on one terminal be detached from one terminal and moved to another.
ok deraadt pirofti