OpenBSD CVS

CVS log for src/usr.bin/tmux/server-fn.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.137 / (download) - annotate - [select for diffs], Thu Apr 4 22:44:40 2024 UTC (6 weeks, 2 days ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Pick newest session as documented, not oldest, from Magnus Gross.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Mar 21 11:30:42 2024 UTC (8 weeks, 2 days ago) by nicm
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (colored)

Do not notify window-layout-changed if the window is about to be
destroyed (since it may have been freed by the time the notify happens),
from Romain Francoise in GitHub issue 3860.

Revision 1.135 / (download) - annotate - [select for diffs], Tue Feb 13 08:10:23 2024 UTC (3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.134: +20 -4 lines
Diff to previous 1.134 (colored)

Add two new values for the destroy-unattached option to destroy sessions
only if they are not members of sessions groups, from Mark Huang, GitHub
issue 3806.

Revision 1.134 / (download) - annotate - [select for diffs], Fri Sep 1 13:48:54 2023 UTC (8 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.133: +30 -27 lines
Diff to previous 1.133 (colored)

Add detach-on-destroy previous and next, mostly from Alexis Hildebrandt.

Revision 1.133 / (download) - annotate - [select for diffs], Tue Mar 8 18:31:46 2022 UTC (2 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.132: +20 -24 lines
Diff to previous 1.132 (colored)

Add remain-on-exit-format to set text shown when pane is dead.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Aug 17 16:19:00 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.131: +2 -2 lines
Diff to previous 1.131 (colored)

Set the right session if detach-on-destroy is off.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Aug 13 06:52:51 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.130: +3 -15 lines
Diff to previous 1.130 (colored)

Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced.
GitHub issue 2808.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Feb 1 08:01:14 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.129: +22 -5 lines
Diff to previous 1.129 (colored)

Add a no-detached choice to detach-on-destroy which detaches only if
there are no other detached sessions to switch to, from Sencer Selcuk in
GitHub issue 2553.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jan 4 08:43:16 2021 UTC (3 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.128: +13 -5 lines
Diff to previous 1.128 (colored)

Add a variant of remain-on-exit that only keeps the pane if the program
failed, GitHub issue 2513.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Jul 30 07:32:52 2020 UTC (3 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored)

Trim newline from ctime, from Thomas Adam.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Jul 4 14:24:02 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.126: +33 -19 lines
Diff to previous 1.126 (colored)

kill-window -a cannot just walk the list of windows because if
renumber-windows is on, the window it wants to keep could be moved.
Change to renumber afterwards and also behave better if the window is
linked into the session twice. GitHub issue 2287.

Revision 1.126 / (download) - annotate - [select for diffs], Sat May 16 16:20:59 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.125: +3 -1 lines
Diff to previous 1.125 (colored)

Add a client flag 'active-pane' which stores the active pane in the
client and allows it to be changed independently from the real active
pane stored in the window. This is can be used with session groups which
allow an independent current window (although it would be nice to have a
flag for this too and remove session groups). The client active pane is
only really useful interactively, many things (hooks, window-style,
zooming) still use the window active pane.

Revision 1.125 / (download) - annotate - [select for diffs], Sat May 16 15:34:08 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (colored)

Do not hoke into struct window_pane from the tty code and instead set
everything up in tty_ctx. Provide a way to initialize the tty_ctx from a
callback and use it to let popups draw directly through input_parse in
the same way as panes do, rather than forcing a full redraw on every
change.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Apr 16 07:28:36 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

Show signal name when process exits rather than number.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Dec 12 11:39:56 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.122: +1 -31 lines
Diff to previous 1.122 (colored)

Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jun 20 11:59:59 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.121: +2 -2 lines
Diff to previous 1.121 (colored)

Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown
with set-option -p and show-options -p.

Change remain-on-exit and window-style/window-active-style to be pane
options (some others will be changed later).

This makes select-pane -P and -g unnecessary so no longer document them
(they still work) and no longer document set-window-option and
show-window-options in favour of set-option -w and show-options -w.

Revision 1.121 / (download) - annotate - [select for diffs], Fri May 3 20:44:24 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored)

Allow panes to be empty (no command), output can be piped to them with
split-window or display-message -I.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Apr 17 14:37:48 2019 UTC (5 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Break new window and pane creation common code from various commands and
window.c into a separate file spawn.c.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Mar 12 20:02:47 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

DECRC and DECSC apparently need to preserve origin mode as well, based
on a fix from Marc Reisner.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Nov 30 08:44:40 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.117: +2 -1 lines
Diff to previous 1.117 (colored)

Clear PANE_EXITED flag when starting new child process in case the pane
has been respawned.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Oct 18 08:38:01 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.116: +2 -1 lines
Diff to previous 1.116 (colored)

Support for windows larger than visible on the attached client. This has
been a limitation for a long time.

There are two new options, window-size and default-size, and a new
command, resize-window. The force-width and force-height options and the
session_width and session_height formats have been removed.

The new window-size option tells tmux how to work out the size of
windows: largest means it picks the size of the largest session,
smallest the smallest session (similar to the old behaviour) and manual
means that it does not automatically resize windows. The default is
currently largest but this may change. aggressive-resize modifies the
choice of session for largest and smallest as it did before.

If a window is in a session attached to a client that is too small, only
part of the window is shown. tmux attempts to keep the cursor visible,
so the part of the window displayed is changed as the cursor moves (with
a small delay, to try and avoid excess redrawing when applications
redraw status lines or similar that are not currently visible). The
offset of the visible portion of the window is shown in status-right.

Drawing windows which are larger than the client is not as efficient as
those which fit, particularly when the cursor moves, so it is
recommended to avoid using this on slow machines or networks (set
window-size to smallest or manual).

The resize-window command can be used to resize a window manually. If it
is used, the window-size option is automatically set to manual for the
window (undo this with "setw -u window-size"). resize-window works in a
similar way to resize-pane (-U -D -L -R -x -y flags) but also has -a and
-A flags. -a sets the window to the size of the smallest client (what it
would be if window-size was smallest) and -A the largest.

For the same behaviour as force-width or force-height, use resize-window
-x or -y, and "setw -u window-size" to revert to automatic sizing..

If the global window-size option is set to manual, the default-size
option is used for new windows. If -x or -y is used with new-session,
that sets the default-size option for the new session.

The maximum size of a window is 10000x10000. But expect applications to
complain and much higher memory use if making a window excessively
big. The minimum size is the size required for the current layout
including borders.

The refresh-client command can be used to pan around a window, -U -D -L
-R moves up, down, left or right and -c returns to automatic cursor
tracking. The position is reset when the current window is changed.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Aug 19 16:45:03 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

Add a client redraw-window flag instead of the redraw-all flag and for
all just use the three flags together (window, borders, status).

Revision 1.115 / (download) - annotate - [select for diffs], Sat Aug 18 20:08:52 2018 UTC (5 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.114: +2 -2 lines
Diff to previous 1.114 (colored)

SESSION_UNATTACHED flag is no longer necessary now we have an attached
count instead.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 10 10:48:44 2018 UTC (6 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.113: +17 -1 lines
Diff to previous 1.113 (colored)

Add x and X to choose-tree (with a confirmation prompt) to kill an
item. Suggested by Matt Zagrabelny.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Feb 28 08:55:44 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.112: +2 -4 lines
Diff to previous 1.112 (colored)

Add -Z flag to choose-tree, choose-client, choose-buffer to
automatically zoom the pane when the mode is entered and unzoom when it
exits, assuming the pane is not already zoomed. Add -Z to the default
key bindings.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Oct 12 11:32:27 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.111: +25 -7 lines
Diff to previous 1.111 (colored)

Show exit status and time in the remain-on-exit pane text, mostly from
Timo Boettcher in GitHub issue 1103.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Aug 29 09:18:48 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored)

Check for complete keys before escape prefix, allows keys to be defined
with a leading escape. GitHub issue 1048.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Jul 12 09:07:52 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

proc_send_s now seems unnecessary.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jul 9 22:33:09 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

Some extra logging to show why tmux might exit.

Revision 1.108 / (download) - annotate - [select for diffs], Fri May 12 13:00:56 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

Scrolling needs to use background colour.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Apr 17 06:40:32 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.106: +1 -2 lines
Diff to previous 1.106 (colored)

Remove a couple of redraw flags that no longer have any effect.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Mar 9 17:06:35 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.105: +1 -42 lines
Diff to previous 1.105 (colored)

Move the client identify (display-panes) code into server-client.c.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Mar 9 17:02:38 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.104: +1 -19 lines
Diff to previous 1.104 (colored)

Move server_fill_environ into environ.c and move some other common code
into it.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Feb 9 15:04:53 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.103: +7 -7 lines
Diff to previous 1.103 (colored)

Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one
session.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Jan 13 11:56:43 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)

Make options_get_string return const string.

Revision 1.102 / (download) - annotate - [select for diffs], Sun Oct 16 22:06:40 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.101: +12 -10 lines
Diff to previous 1.101 (colored)

Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Oct 11 13:21:59 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored)

Add static in window-*.c and move some internal functions out of tmux.h.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.99: +5 -5 lines
Diff to previous 1.99 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.99 / (download) - annotate - [select for diffs], Thu Jun 16 10:55:47 2016 UTC (7 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.98: +12 -10 lines
Diff to previous 1.98 (colored)

Allow a command to be specified to display-panes, similar to
command-prompt, rather than always just selecting the pane.

Revision 1.98 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Dec 16 21:50:37 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.96: +9 -2 lines
Diff to previous 1.96 (colored)

Add infrastructure to work out the best target given a pane or window
alone and use it to add pane_died and pane_exited hooks.

Revision 1.96 / (download) - annotate - [select for diffs], Sat Dec 12 18:32:24 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.95: +2 -1 lines
Diff to previous 1.95 (colored)

Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.

Revision 1.95 / (download) - annotate - [select for diffs], Fri Dec 11 12:39:47 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

Check alerts when session changes, from Patrick Palka.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Nov 24 23:46:15 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.93: +6 -7 lines
Diff to previous 1.93 (colored)

Make environ_set va_args and use it to tidy up some calls. Also add a
missing word in manpage (from jmc).

Revision 1.93 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

Use __unused rather than rolling our own.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Nov 14 09:41:07 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.91: +1 -45 lines
Diff to previous 1.91 (colored)

Push stdout and stderr to clients more aggressively, and add an event to
continue if the send fails.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Oct 27 15:58:42 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.90: +9 -9 lines
Diff to previous 1.90 (colored)

Move struct options into options.c.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Oct 27 13:23:24 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.89: +8 -58 lines
Diff to previous 1.89 (colored)

Break the common process set up, event loop and imsg dispatch code
between server and client out into a separate internal API. This will
make it easier to add another process.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Oct 20 21:12:09 2015 UTC (8 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

Use client pointer not file descriptor in logging.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Sep 10 08:58:14 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.87: +2 -1 lines
Diff to previous 1.87 (colored)

Add session_last_attached time and format, from Sina Siadat.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 28 13:01:03 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

Make session_update_activity more useful and use it in more places.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Aug 28 12:16:28 2015 UTC (8 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.85: +2 -1 lines
Diff to previous 1.85 (colored)

Run status update on a per-client timer at status-interval.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Apr 29 15:59:08 2015 UTC (9 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

If default-terminal is set to "screen" or "screen-*", emulate screen's
historical (incorrect) behaviour for SGR 3 and send smso
(standout). Previously, we would send sitm (italics) if the terminal
outside had it and smso otherwise. This was acceptably until recently
because xterm's terminfo entry lacked sitm, so most users got smso.

People who want italics should set default-terminal to the forthcoming
"tmux" entry (and be prepared to deal with it being missing on older
hosts).

As a side-effect this changes default-terminal to be a server rather
than a session option.

suggested by and ok naddy

Revision 1.84 / (download) - annotate - [select for diffs], Fri Apr 24 23:17:11 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.83: +16 -44 lines
Diff to previous 1.83 (colored)

Convert clients list into a TAILQ.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Apr 22 15:32:33 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

Make session_has return a flag, returning the first winlink found is a
recipe for errors.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Apr 21 21:24:49 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.81: +1 -2 lines
Diff to previous 1.81 (colored)

Fix moving windows to nonexistent indexes when renumber-windows is
off. From Thomas Adam, reported by Daniel Levai and Theo Buehler.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Apr 19 21:46:52 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (colored)

Honour renumber-windows when unlinking a window, from Thomas Adam.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Apr 19 21:34:21 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.79: +5 -4 lines
Diff to previous 1.79 (colored)

Rewrite of tmux mouse support which was a mess. Instead of having
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.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Mar 31 17:45:10 2015 UTC (9 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

Fix some format specifier nits, from Ben Boeckel.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Jan 6 09:12:53 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.77: +2 -1 lines
Diff to previous 1.77 (colored)

Unzoom before kill, from Thomas Adam.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Oct 20 23:27:14 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Tidy up some includes.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Apr 17 14:45:49 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

Some more long lines.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Feb 14 13:59:01 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.74: +4 -4 lines
Diff to previous 1.74 (colored)

Style nit - no space between function name and bracket.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Oct 10 12:26:36 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.73: +5 -5 lines
Diff to previous 1.73 (colored)

Alter how tmux handles the working directory to internally use file
descriptors rather than strings.

- Each session still has a current working directory.

- New sessions still get their working directory from the client that
  created them or its attached session if any.

- New windows are created by default in the session working directory.

- The -c flag to new, neww, splitw allows the working directory to be
  overridden.

- The -c flag to attach let's the session working directory be changed.

- The default-path option has been removed.

To get the equivalent to default-path '.', do:

        bind c neww -c $PWD

To get the equivalent of default-path '~', do:

        bind c neww -c ~

This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.

Revision 1.73 / (download) - annotate - [select for diffs], Thu Oct 10 12:13:56 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.72: +1 -2 lines
Diff to previous 1.72 (colored)

Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Oct 10 12:13:29 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.71: +5 -7 lines
Diff to previous 1.71 (colored)

Instead of fixed size buffers for some messages, send only the string
length.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Oct 10 11:46:28 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.70: +5 -4 lines
Diff to previous 1.70 (colored)

Grouped sessions were being leaked on destroy, correctly free them.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Jul 5 14:52:33 2013 UTC (10 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.69: +11 -5 lines
Diff to previous 1.69 (colored)

When the session option renumber-window is used, ensure we iterate over
all sessions in that group when the winlinks are reordered, otherwise
the winlink lists are out of sync with one another. From Thomas Adam.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Apr 22 13:35:18 2013 UTC (11 years ago) by nicm
Branch: MAIN
Changes since 1.68: +2 -1 lines
Diff to previous 1.68 (colored)

Call recalculate_sizes() after killing window in case it is in a grouped
session, from Daniel Ralston.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Mar 25 11:36:59 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.67: +5 -1 lines
Diff to previous 1.67 (colored)

Use single stdout and stderr for control clients.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Mar 25 10:11:45 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Mar 24 09:57:59 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.65: +10 -1 lines
Diff to previous 1.65 (colored)

Add resize-pane -Z to temporary zoom the active pane to occupy the full
window or unzoom (restored to the normal layout) if it already zoomed,
bound to C-b z by default. The pane is unzoomed on pretty much any
excuse whatsoever.

We considered making this a new layout but the requirements are quite
different from layouts so decided it is better as a special case. Each
current layout cell is saved, a temporary one-cell layout generated and
all except the active pane set to NULL.

Prompted by suggestions and scripts from several. Thanks to Aaron Jensen
and Thiago Padilha for testing an earlier version.

Revision 1.65 / (download) - annotate - [select for diffs], Sun Mar 24 09:54:10 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Add a command queue to standardize and simplify commands that call other
commands and allow a command to block execution of subsequent
commands. This allows run-shell and if-shell to be synchronous which has
been much requested.

Each client has a default command queue and commands are consumed one at
a time from it. A command may suspend execution from the queue by
returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() -
for example run-shell does this from the callback that is fired after
the job is freed.

When the command queue becomes empty, command clients are automatically
exited (unless attaching). A callback is also fired - this is used for
nested commands in, for example, if-shell which can block execution of
the client's cmdq until a new cmdq becomes empty.

Also merge all the old error/info/print functions together and lose the
old curclient/cmdclient distinction - a cmdq is bound to one client (or
none if in the configuration file), this is a command client if
c->session is NULL otherwise an attached client.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Mar 22 10:42:55 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

Prevent lock on control clients, not on others.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.62: +1 -2 lines
Diff to previous 1.62 (colored)

No more lint means no more ARGSUSED.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 21 18:47:01 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.61: +4 -1 lines
Diff to previous 1.61 (colored)

Add various checks to turn off bits that can't work in control mode
(such as lock).

Revision 1.61 / (download) - annotate - [select for diffs], Mon Sep 3 08:48:57 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.60: +4 -1 lines
Diff to previous 1.60 (colored)

If stdin in the client is enable immediately, tmux will eat anything
sent to stdin before it is needed, which can be inconvenient (eg pasting
commands). Instead, start with stdin disabled and reuse MSG_STDIN from
server->client to mean that stdin should be enabled. Based on a diff
from Chris Johnsen.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jun 18 13:16:42 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.58: +3 -1 lines
Diff to previous 1.58 (colored)

Add a skeleton mode to tmux (called "control mode") that let's tmux
commands be sent and output received on stdout. This can be used to
integrate with other terminal emulators and should allow some other
things to be made simpler later. More to come so doesn't do much yet and
deliberately not documented.

Revision 1.58 / (download) - annotate - [select for diffs], Tue May 22 10:56:48 2012 UTC (11 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.57: +7 -1 lines
Diff to previous 1.57 (colored)

Add a helper function to send ready message.

Revision 1.57 / (download) - annotate - [select for diffs], Mon May 21 18:27:42 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.56: +77 -5 lines
Diff to previous 1.56 (colored)

Instead of passing stdin/stdout/stderr file descriptors over imsg and
handling them in the server, handle them in the client and pass buffers
over imsg. This is much tidier for some upcoming changes and the
performance hit isn't critical.

The tty fd is still passed to the server as before.

This bumps the tmux protocol version so new clients and old servers are
incompatible.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Apr 29 17:20:01 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored)

Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Mar 17 22:35:09 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.54: +3 -1 lines
Diff to previous 1.54 (colored)

Add notify hooks for various events, the functions are currently empty
stubs but will be filled in for control mode later. From George Nachman.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Mar 17 18:24:07 2012 UTC (12 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.53: +5 -3 lines
Diff to previous 1.53 (colored)

Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jan 29 02:22:11 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Call bufferevent_free before closing file descriptor associated with it
or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Oct 23 10:16:14 2011 UTC (12 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

Support for \e[3J to clear the history. Also send the corresponding
terminfo code (E3) before locking.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 5 23:40:51 2011 UTC (12 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.50: +19 -3 lines
Diff to previous 1.50 (colored)

Mark dead panes with some text saying they are dead, suggested by and
with help from Randy Stauner.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Jan 23 11:03:43 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.49: +15 -9 lines
Diff to previous 1.49 (colored)

Set $TMUX without the session when background jobs are run.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jan 1 01:12:09 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (colored)

Don't reset the activity timer for unattached sessions every second,
this screws up the choice of most-recently-used. Instead, break the time
update into a little function and do it when the session is attached.

Pointed out by joshe@.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Dec 23 21:56:38 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.47: +7 -3 lines
Diff to previous 1.47 (colored)

server_kill_window can modify the RB tree so don't use RB_FOREACH, fixes
crash seen by Dan Harnett.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Dec 21 22:37:59 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.46: +11 -22 lines
Diff to previous 1.46 (colored)

Store sessions in an RB tree by name rather than a list, this is tidier
and allows them to easily be shown sorted in various lists
(list-sessions/choose-sessions).

Keep a session index which is used in a couple of places internally but
make it an ever-increasing number rather than filling in gaps with new
sessions.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Dec 20 00:17:22 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Use pointer rather than index for the client's last session.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Dec 11 18:39:25 2010 UTC (13 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

Track the last session for a client and add a flag to switch-client and
a key binding (L) to move a client back to its last session.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Oct 9 12:58:00 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.43: +4 -2 lines
Diff to previous 1.43 (colored)

Set cause when failing due to linking a window to itself, from Martin
Pieuchot.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Oct 5 17:15:21 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Skip NULL entries in the sessions list when choosing the next session,
from Simon Olofsson.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Sep 26 20:43:30 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.41: +20 -1 lines
Diff to previous 1.41 (colored)

Two new options:

- server option "exit-unattached" makes the server exit when no clients
  are attached, even if sessions are present;

- session option "destroy-unattached" destroys a session once no clients
  are attached to it.

These are useful for preventing tmux remaining in the background where
it is undesirable and when using tmux as a login shell to keep a limit
on new sessions.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Aug 11 07:36:23 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Treat trying to link or move to the same window as an error to avoid
removing it accidentally.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jul 24 20:11:59 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

When changing so that the client passes its stdout and stderr as well as
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.

So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.

Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.

This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jun 27 00:22:22 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.38: +34 -4 lines
Diff to previous 1.38 (colored)

New option, detach-on-destroy, to set what happens to a client when the session
it is attached to is destroyed. If on (the default), it is detached; if off, it
is switched to the most recently active session.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 26 23:55:50 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Use server_destroy_session() for kill-session.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:46 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.36: +4 -4 lines
Diff to previous 1.36 (colored)

Having a list of winlinks->alerts for each session is stupid, just store
the alert flags directly in the winlink itself.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Apr 17 23:25:16 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.35: +6 -4 lines
Diff to previous 1.35 (colored)

If remain-on-exit is set, both the error callback and a SIGCHLD could
destroy the same pane (because the first one doesn't remove it from the
list of panes), causing the pane bufferevent to be freed twice. So don't
free it if the fd has already been set to -1, from Romain Francoise.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 22 19:18:46 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.34: +1 -10 lines
Diff to previous 1.34 (colored)

Dead functions, lint.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jan 23 21:07:31 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.33: +8 -8 lines
Diff to previous 1.33 (colored)

When a window is destroyed, remove all links to it from each session rather
than just the first. Reported by Robin Lee Powell.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jan 3 12:51:05 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.32: +16 -1 lines
Diff to previous 1.32 (colored)

Options to set the colour of the pane borders, with different colours for the
active pane.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Dec 22 10:20:08 2009 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.31: +3 -5 lines
Diff to previous 1.31 (colored)

Fix a couple of problems with grouped sessions reported by danh: redraw
properly and choose the correct last window after a window is killed.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.30: +9 -9 lines
Diff to previous 1.30 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.30 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Nov 13 17:33:07 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.28: +22 -1 lines
Diff to previous 1.28 (colored)

Destroy panes immediately rather than checking them all every loop.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 4 23:29:42 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.27: +15 -5 lines
Diff to previous 1.27 (colored)

Use timeout events for the identify and message timers.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Nov 4 23:12:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.26: +17 -1 lines
Diff to previous 1.26 (colored)

Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Oct 11 10:39:27 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

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 :-/...

Revision 1.25 / (download) - annotate - [select for diffs], Sat Oct 10 10:02:48 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.24: +61 -14 lines
Diff to previous 1.24 (colored)

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.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Oct 4 10:55:30 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.23: +4 -5 lines
Diff to previous 1.23 (colored)

Check for already locked/suspended clients in server_lock_client rather than
its callers.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Sep 24 14:17:09 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.22: +37 -14 lines
Diff to previous 1.22 (colored)

New lock-client and lock-session commands to lock an individual client or all
clients attached to a session respectively.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Sep 23 06:18:47 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.21: +14 -98 lines
Diff to previous 1.21 (colored)

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.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Sep 20 17:27:18 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.20: +54 -2 lines
Diff to previous 1.20 (colored)

Move some common and untidy code for window link/unlink into generic functions
instead of duplicating it in move/link window..

Revision 1.20 / (download) - annotate - [select for diffs], Sun Sep 20 14:58:12 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Regularise some fatal messages.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Sep 12 13:01:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.18: +21 -17 lines
Diff to previous 1.18 (colored)

Tidy some common code for destroying sessions into a new function.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Sep 5 17:42:16 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored)

Only redraw all clients once when the backoff timer expires rather than every
second all the time.

Reported by Simon Nicolussi.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Sep 2 16:38:35 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.16: +39 -4 lines
Diff to previous 1.16 (colored)

When incorrect passwords are entered, behave similarly to login(1) and backoff
for a bit. Based on a diff from martynas@.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Sep 1 09:11:05 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Use "Password:" with no space for password prompts and don't display a *s for
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Aug 31 20:46:19 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.14: +30 -1 lines
Diff to previous 1.14 (colored)

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.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 11 17:18:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.13: +4 -10 lines
Diff to previous 1.13 (colored)

Switch tmux to use imsg. This is the last major change to make the
client-server protocol more resilient and make the protocol versioning work
properly. In future, the only things requiring a protocol version bump will be
changes in the message structs, and (when both client and server have this
change) mixing different versions should nicely report an error message.

As a side effect this also makes the code tidier, fixes a problem with the way
errors reported during server startup were handled, and supports fd passing
(which will be used in future).

Looked over by eric@, thanks.

Please note that mixing a client with this change with an older server or vice
versa may cause tmux to crash or hang - tmux should be completely exited before
upgrading.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 8 21:52:43 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.12: +9 -14 lines
Diff to previous 1.12 (colored)

Infrastructure and commands to manage the environment for processes started
within tmux.

There is a global environment, copied from the external environment when the
server is started and each sesssion has an (initially empty) session
environment which overrides it.

New commands set-environment and show-environment manipulate or display the
environments.

A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Aug 7 15:39:10 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

If there is an error in the configuration file, don't just exit(1) as this can
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.

This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.

Prompted by Theo noticing the behaviour on error wasn't documented.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jul 29 14:17:26 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Rename struct hdrtype to msgtype which is a better name and can be used even
when struct hdr disappears.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jul 26 12:58:44 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.9: +11 -2 lines
Diff to previous 1.9 (colored)

Make all messages sent between the client and server fixed size.

This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly with commands. The client
now packs argv into a buffer and sends it to the server for parsing, rather
than doing it itself and sending the parsed command data.

As a side-effect this also removes a lot of now-unused command marshalling
code.

Mixing a server without this change and a client with or vice versa will cause
tmux to hang or crash, please ensure that tmux is entirely killed before
upgrading.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 20 14:37:51 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +4 -2 lines
Diff to previous 1.8 (colored)

Display the number of failed password attempts (if any) when the server is
locked. From Tom Doherty.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 17 20:37:03 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +34 -1 lines
Diff to previous 1.7 (colored)

Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 17 07:09:46 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Oops, it is always a good idea to get arguments the right way round.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 17 06:13:27 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Memory could be leaked if a second prompt or message appeared while another was
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.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 14 06:59:06 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Need time.h not sys/time.h for time(2).

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jul 10 05:50:54 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.3: +7 -3 lines
Diff to previous 1.3 (colored)

Add a default-terminal option to set the starting value of $TERM in new
windows.

This is "screen" by default and must be either that or something closely
related. This does makes it easier to customise it if necessary.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jun 30 13:40:30 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

When unlocking the server, don't try to clear the prompt on clients without a
prompt (such as the one issuing the unlock request).

This caused the server to die if the wrong password was entered when unlocking
from the command line with -U (nasty).

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 25 06:15:04 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.1: +1 -17 lines
Diff to previous 1.1 (colored)

Miscellaneous unused functions, including one which was basically a
duplicate. Found by lint.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jun 1 22:58:49 2009 UTC (14 years, 11 months ago) by nicm
Branch: MAIN

Import tmux, a terminal multiplexor allowing (among other things) a single
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

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.