of storing a full grid_cell with UTF-8 data and everything, store a new
type grid_cell_entry. This can either be the cell itself (for ASCII
cells), or an offset into an extended array (per line) for UTF-8
data.
This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the
majority for most users) without the complexity of the shadow array we
had before. Grid memory without any UTF-8 is about half.
The disadvantage that cells can no longer be modified in place and need
to be copied out of the grid and back but it turned out to be lot less
complicated than I expected.
uint64_t and converting UTF-8 to Unicode on input and the reverse on
output. (This allows key bindings, there are still omissions - the
largest being that the various prompts do not accept UTF-8.)
options for "mouse-this" and "mouse-that", mouse events may be bound as
keys and there is one option "mouse" that turns on mouse support
entirely (set -g mouse on).
See the new MOUSE SUPPORT section of the man page for description of the
key names and new flags (-t= to specify the pane or window under mouse
as a target, and send-keys -M to pass through a mouse event).
The default builtin bindings for the mouse are:
bind -n MouseDown1Pane select-pane -t=; send-keys -M
bind -n MouseDown1Status select-window -t=
bind -n MouseDrag1Pane copy-mode -M
bind -n MouseDrag1Border resize-pane -M
To get the effect of turning mode-mouse off, do:
unbind -n MouseDrag1Pane
unbind -temacs-copy MouseDrag1Pane
The old mouse options are now gone, set-option -q may be used to
suppress warnings if mixing configuration files.
options with a single foo-style option. For example:
set -g status-fg yellow
set -g status-bg red
set -g status-attr blink
Becomes:
set -g status-style fg=yellow,bg=red,blink
The -a flag to set can be used to add to rather than replace a style. So:
set -g status-bg red
Becomes:
set -ag status-style bg=red
Currently this is fully backwards compatible (all *-{fg,bg,attr} options
remain) but the plan is to deprecate them over time.
From Tiago Cunha.
command-prompt. Also move responsibility for calling status_replace into
status_prompt_{set,update} and add #W and #P to the default kill-window
and kill-pane prompts. By Tiago Cunha.
fire-and-forget.
Status jobs now managed with two trees of output (new and old), rather
than storing the output in the jobs themselves. When the status line is
processed any jobs which don't appear in the new tree are started and
the output from the old tree displayed. When a job finishes it updates
the new tree with its output and that is used for any subsequent
redraws. When the status interval expires, the new tree is moved to the
old so that all jobs are run again.
This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands
of identical persistent jobs and high memory use (this can still be
achieved by adding "sleep 30" but that is much less likely to happen by
accident).
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.
a -w flag to set-option and show-options and making setw and showw aliases to
set -w and show -w.
Note: setw and showw are still there, but now aliases for set -w and show -w.
allow the format of each window in the status line window list to be controlled
using similar # sequences as status-left/right.
This diff also moves part of the way towards UTF-8 support in window names but
it isn't quite there yet.
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).
This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.
already be set from the shell and are just passed through when printing (so
invisible characters or displaying on terminals with different character sets
may cause problems).
Note that entering UTF-8 may not work and in any case currently the status line
cannot display it correctly (outside of status-left/status-right).
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.
Fixes problems with changing options from inside #().
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.
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.
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.
or more prompts to present in order.
The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts
The default template is "%1" so the response to the first prompt is processed
as a command.
Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".
From Tiago Cunha.
response and reserve NULL for an explicit cancel. Change all callbacks to treat
them the same so no functional change.
Also add cancel key bindings to emacs mode which were missing.
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.
a named tree on start and use that for lookups. Also add command to string
translation tables and modify list-keys to show the the mode key bindings (new
-t argument).
lumping them all together, split editing keys from those used in choice/more
mode and those for copy/scroll mode.
Tidier and clearer, and the first step towards customisable mode keys.
status line (bound to "i" and displays the current window and time by
default). The same substitutions are applied as for status-left/right.
- Add support for including the window index (#I), pane index (#P) and window
name (#W) in the message, and status-left or status-right.
- Bump protocol version.
From Tiago Cunha, thanks!
still present, so add a separate prompt free callback and make the _clear
function responsible for calling it if necessary (rather than the individual
prompt callbacks). Also make both messages and prompts clear any existing when
a new is set.
In addition, the screen could be modified while the prompt is there, restore
the redraw-entire-screen behaviour on prompt clear; add a comment as a
reminder.
annoying and it is only use for iterating, so use a sentinel to mark the end of
each array instead. Different fix for a problem pointed out by Kalle Olavi
Niemitalo.
done for UTF-8, limit to the maximum length correctly when printing, and always
print a space even if the left string is longer than the width available.
status-left/status-right work properly. At the moment any top-bit-set
characters are assumed to be UTF-8: a status-utf8 option to configure this will
come shortly.
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