Code Log


Commit Date  
[a36da3] (3.2 kB) by Nicholas Marriott Nicholas Marriott

Remove the barely-used and unnecessary command check() function.

2013-08-21 17:01:40 View
Download
[e2e856] (3.2 kB) by Nicholas Marriott Nicholas Marriott

tty.path can be NULL, don't dereference it. From George Nachman.

2013-03-25 10:04:44 View
Download
[20636d] (3.2 kB) by Nicholas Marriott Nicholas Marriott

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.

2013-03-24 09:54:10 View
Download
[180faf] (3.2 kB) by Nicholas Marriott Nicholas Marriott

Allow choose commands to be used outside tmux, so long as at least one
client is attached.

2013-03-21 16:09:59 View
Download
[43d904] (3.2 kB) by Nicholas Marriott Nicholas Marriott

tty.path can be NULL, don't dereference it. From George Nachman.

2013-03-04 09:02:32 View
Download
[396430] (3.2 kB) by Nicholas Marriott Nicholas Marriott

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.

2013-02-23 22:25:58 View
Download
[f1ce95] (3.2 kB) by Nicholas Marriott Nicholas Marriott

Allow choose commands to be used outside tmux, so long as at least one client
is attached.

2013-02-10 17:52:51 View
Download
[aadc87] (3.2 kB) by Nicholas Marriott Nicholas Marriott

Remove free callback for window_choose_data objects.

2013-02-10 17:36:58 View
Download
[4d382a] (3.2 kB) by Nicholas Marriott Nicholas Marriott

Miscellaneous tidying of choose API, including:

- rename client and session to start_client and start_session in
window_choose_data struct. also add TREE_OTHER define and reorder the
struct
- rename window_choose_ctx to window_choose_data_run
- don't pass a cmd_ctx into window_choose_create (will let it use a
different client later). instead take type, session, client
- add window_choose_data_free and use it to dispose of wcd rather than
each cmd-*.c doing it individually
- change so ref counting is done by wcd_add and wcd_free rather than
callers. this means 1 ref for each item but what of it :-)
- also add a ref to tree_session - not sure if this is needed?
- all the callbacks except choose-client and find-window are the same so
remove them and add window_choose_default_callback
- reorder/rename some other bits and pieces for tidyness

2013-02-10 17:32:58 View
Download
[3a09e0] (3.5 kB) by Nicholas Marriott Nicholas Marriott

Do not allow cursor colours to be set beginning with ? as that will
report the colour, from Hayaki Saito.

2013-01-17 20:30:43 View
Download
[b43388] (3.5 kB) by Nicholas Marriott Nicholas Marriott

We can't tell what the terminal has done with a DCS string, so reset the
cursor and attributes afterwards.

2012-09-05 09:59:41 View
Download
[1c6080] (3.5 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1162:

Use a separate define for each default format template and strip clutter
from the choose-tree defaults.

2012-08-31 09:18:50 View
Download
[1f5e6e] (3.5 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1151:

Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.

2012-07-11 19:37:32 View
Download
[a432fc] (3.4 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1150:

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

2012-07-11 19:34:16 View
Download
[7e02d2] (3.4 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1143:

Provide common helper function for adding windows and sessions to choose
lists and expand %% in command before using it rather than at callback
time. From Thomas Adam.

2012-07-04 11:03:20 View
Download
[576171] (3.3 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1142:

Clean up and simplify the choose mode code, from Thomas Adam.

2012-07-04 11:01:00 View
Download
[5cc496] (3.9 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 1119:

Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.

2012-05-22 21:03:25 View
Download
[87a2a1] (3.7 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 946:

Add a -r flag to switch-client to toggle the client read-only flag. From
Johan Commelin.

2011-08-21 12:38:55 View
Download
[391f1f] (3.7 kB) by Tiago Cunha Tiago Cunha

Expand the Id keyword.

2011-07-09 09:42:33 View
Download
[1df427] (3.7 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 829:

Clean up and simplify tmux command argument parsing.

Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.

This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).

This is overall more simple and consistent.

There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.

2011-01-07 14:45:34 View
Download
[e35f5b] (3.8 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 539:

Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
command entry structs and a couple of functions to check/set the flags.

2009-11-14 17:56:39 View
Download
[930f67] (3.8 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 320:

Reference count clients and sessions rather than relying on a saved index for
cmd-choose-*.

2009-09-07 23:59:19 View
Download
[bd5b01] (3.8 kB) by Tiago Cunha Tiago Cunha

Include <ctype.h>.

2009-08-25 13:55:29 View
Download
[8fd77c] (3.8 kB) by Tiago Cunha Tiago Cunha

Sync OpenBSD patchset 294:

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).

2009-08-25 13:53:39 View
Download