OpenBSD CVS

CVS log for src/usr.bin/tmux/Attic/window-choose.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.92, Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.91: +1 -1 lines
FILE REMOVED

Rewrite of choose mode, both to simplify and tidy the code and to add
some modern features.

Now the common code is in mode-tree.c, which provides an API used by the
three modes now separated into window-{buffer,client,tree}.c. Buffer
mode shows buffers, client mode clients and tree mode a tree of
sessions, windows and panes.

Each mode has a common set of key bindings plus a few that are specific
to the mode. Other changes are:

- each mode has a preview pane: for buffers this is the buffer content
  (very useful), for others it is a preview of the pane;

- items may be sorted in different ways ('O' key);

- multiple items may be tagged and an operation applied to all of them
  (for example, to delete multiple buffers at once);

- in tree mode a command may be run on the selected item (session,
  window, pane) or on tagged items (key ':');

- displayed items may be filtered in tree mode by using a format (this
  is used to implement find-window) (key 'f');

- the custom format (-F) for the display is no longer available;

- shortcut keys change from 0-9, a-z, A-Z which was always a bit weird
  with keys used for other uses to 0-9, M-a to M-z.

Now that the code is simpler, other improvements will come later.

Primary key bindings for each mode are documented under the commands in
the man page (choose-buffer, choose-client, choose-tree).

Parts written by Thomas Adam.

Revision 1.91 / (download) - annotate - [select for diffs], Sun May 7 22:27:57 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.90: +3 -1 lines
Diff to previous 1.90 (colored)

Add a format for the name of the pane's mode, lets it be used as a
conditional for key bindings.

Revision 1.90 / (download) - annotate - [select for diffs], Mon May 1 12:20:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

In order that people can use formats like #D in #() in the status line
and not have to wait for an update when they change pane, we allow
commands to run more than once a second if the expanded form
changes. Unfortunately this can mean them being run far too often
(pretty much continually) when multiple clients exist, because some
formats (including #D) will always differ between clients.

To avoid this, give each client its own tree of jobs which means that
the same command will be different instances for each client - similar
to how we have the tag to separate commands for different panes.

GitHub issue 889; test case reported by Paul Johnson.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Apr 28 19:13:55 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.88: +3 -3 lines
Diff to previous 1.88 (colored)

Log what is happening with window and session reference counts much more
obviously.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Mar 17 14:41:54 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.87: +8 -4 lines
Diff to previous 1.87 (colored)

Add h and l for collapse and expand in choose mode with vi(1) keys, from
Gregory Pakosz.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Feb 16 10:53:25 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

Style nits.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Feb 3 11:57:28 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Add a window or pane id "tag" to each format tree and use it to separate
jobs, this means that if the same job is used for different windows or
panes (for example in pane-border-format), it will be run separately for
each pane.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Jan 24 21:50:23 2017 UTC (7 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.84: +153 -65 lines
Diff to previous 1.84 (colored)

Fixed keys for choose mode, and remove the last mode keys bits.

Revision 1.84 / (download) - annotate - [select for diffs], Sun Jan 15 22:00:56 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored)

It is silly for cmd_list_parse to return an integer error when it could
just return NULL.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Jan 7 15:28:13 2017 UTC (7 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.82: +2 -1 lines
Diff to previous 1.82 (colored)

Add support for the OSC 4 and OSC 104 palette setting escape sequences,
from S Gilles.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Oct 16 19:04:05 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.81: +6 -6 lines
Diff to previous 1.81 (colored)

Mass rename struct cmd_q to struct cmdq_item and related.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 16 17:55:14 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.80: +4 -2 lines
Diff to previous 1.80 (colored)

Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Oct 13 20:27:27 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.79: +3 -3 lines
Diff to previous 1.79 (colored)

Add support for BCE (background colour erase). This makes various escape
sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank
cells using the current background colour rather than the default
colour.

On modern systems BCE doesn't really have many benefits, but most other
terminals now support it, some (lazy) applications rely on it, and it is
not hard to include now that we have pane background colours anyway.

Mostly written by Sean Haugh.

Revision 1.79 / (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.78: +54 -47 lines
Diff to previous 1.78 (colored)

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

Revision 1.78 / (download) - annotate - [select for diffs], Tue Oct 11 07:23:34 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.77: +9 -9 lines
Diff to previous 1.77 (colored)

Fundamental change to how copy mode key bindings work:

The vi-copy and emacs-copy mode key tables are gone, and instead copy
mode commands are bound in one of two normal key tables ("copy-mode" or
"copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So:

    bind -temacs-copy C-Up scroll-up
    bind -temacs-copy -R5 WheelUpPane scroll-up

Becomes:

    bind -Tcopy-mode C-Up send -X scroll-up
    bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up

This allows the full command parser and command set to be used - for
example, we can use the normal command prompt for searching, jumping,
and so on instead of a custom one:

    bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'"

command-prompt also gets a -1 option to only require on key press, which
is needed for jumping.

The plan is to get rid of mode keys entirely, so more to come eventually.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Sep 12 15:40:58 2016 UTC (7 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored)

Allow repeat count to be specified in mode key tables with bind-key -R,
and set the default repeat count to 5 for WheelUp and WheelDown in
copy-mode.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Apr 28 07:20:26 2016 UTC (8 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

memmove() the right size when expanding tree.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Apr 26 10:18:57 2016 UTC (8 years ago) by nicm
Branch: MAIN
Changes since 1.74: +87 -61 lines
Diff to previous 1.74 (colored)

Remove last uses of array.h.

Revision 1.74 / (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.73: +2 -2 lines
Diff to previous 1.73 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Dec 11 16:37:21 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.72: +17 -17 lines
Diff to previous 1.72 (colored)

Style nits and line wrapping of function declarations.

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

Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).

Revision 1.71 / (download) - annotate - [select for diffs], Tue Dec 8 08:34:18 2015 UTC (8 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

Remove format_create_flags and just pass flags to format_create.

Revision 1.70 / (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.69: +3 -3 lines
Diff to previous 1.69 (colored)

Use __unused rather than rolling our own.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Nov 12 11:09:11 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.68: +3 -4 lines
Diff to previous 1.68 (colored)

Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
terminal. We still support non-UTF-8 terminals outside tmux, but inside
it is always UTF-8 (as when the utf8 and status-utf8 options were on).

Revision 1.68 / (download) - annotate - [select for diffs], Thu Nov 12 11:05:34 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.67: +13 -12 lines
Diff to previous 1.67 (colored)

Support UTF-8 key bindings by expanding the key type from int to
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.)

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

Move struct options into options.c.

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

Give clock mode its own timer.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jun 5 18:18:32 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.64: +4 -4 lines
Diff to previous 1.64 (colored)

Similarly, for sessions use a callback to free rather than checking
every loop.

Revision 1.64 / (download) - annotate - [select for diffs], Fri May 8 16:23:34 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.63: +9 -1 lines
Diff to previous 1.63 (colored)

window_choose_mode_item can move into window-choose.c.

Revision 1.63 / (download) - annotate - [select for diffs], Thu May 7 08:08:54 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

array.h can be local to window-choose.c now.

Revision 1.62 / (download) - annotate - [select for diffs], Mon May 4 13:04:10 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored)

Use the right index when expanding/collapsing tree, from Thomas Adam.

Revision 1.61 / (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.60: +45 -64 lines
Diff to previous 1.60 (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.60 / (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.59: +2 -2 lines
Diff to previous 1.59 (colored)

Fix some format specifier nits, from Ben Boeckel.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Feb 5 10:29:43 2015 UTC (9 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.58: +3 -5 lines
Diff to previous 1.58 (colored)

Wrap all the individual format_* calls in a single format_defaults
functions.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jan 15 13:43:13 2015 UTC (9 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.57: +4 -7 lines
Diff to previous 1.57 (colored)

Remove an unnecessary variable and shorten a line.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Nov 30 08:03:29 2014 UTC (9 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.56: +1 -31 lines
Diff to previous 1.56 (colored)

Remove dead code, from Thomas Adam.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Oct 22 23:18:53 2014 UTC (9 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

Fix some spacing nits.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Oct 8 17:35:58 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Add xreallocarray and remove nmemb argument from xrealloc.

Revision 1.54 / (download) - annotate - [select for diffs], Thu May 8 07:54:47 2014 UTC (10 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.53: +13 -8 lines
Diff to previous 1.53 (colored)

Instead of forcing mouse scroll to 1 in choose mode, scale it down
instead. Means modifier keys still increase the line count, just not as
much. Based on a diff from Marcel Partap.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Apr 17 14:13:59 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.52: +12 -10 lines
Diff to previous 1.52 (colored)

Only scroll by one line at a time in choose mode, lists are generally
pretty small.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Apr 3 08:20:29 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.51: +12 -2 lines
Diff to previous 1.51 (colored)

Work out mouse scroll wheel effect when the mouse is first detected and
store it in struct mouse_event, reduce the scroll size the 3 but allow
shift to reduce it to 1 and meta and ctrl to multiply by 3 if the
terminal supports them, also support wheel in choose mode. From Marcel
Partap.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Mar 31 21:36:43 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.50: +24 -1 lines
Diff to previous 1.50 (colored)

Add start-of-list, end-of-list, top-line and bottom-line in choice mode,
from madmaverick9 at roxxmail dot eu, similar diff a few days later from
Marcel Partap.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jan 28 23:07:09 2014 UTC (10 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

Allow replacing each of the many sets of separate foo-{fg,bg,attr}
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.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jan 9 13:58:06 2014 UTC (10 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -3 lines
Diff to previous 1.48 (colored)

Style and comment fixes from Tiago Cunha.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Oct 10 11:58:52 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.47: +18 -9 lines
Diff to previous 1.47 (colored)

choose-tree: Reset top when toggling items

When choose-tree is told to expand/collapse items (especially when first
rendering collapsed to just show sessions), ensure that in addition to
setting the selected item, that the item itself appears on the bottom of
the screen, rather than off screen.

This was causing rendering glitches when a very small tmux window tried
to render a list of items in choose-tree much larger than itself, and
the selected item appeared off screen, and didn't show the selection
until the selection had wrapped around to the top of the screen.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Apr 22 22:17:29 2013 UTC (11 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.46: +12 -4 lines
Diff to previous 1.46 (colored)

When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.

Revision 1.46 / (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.45: +2 -2 lines
Diff to previous 1.45 (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.45 / (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.44: +5 -12 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Fri Mar 22 15:54:29 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.43: +2 -3 lines
Diff to previous 1.43 (colored)

Need to set clients in context before changing their reference count.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 22 15:52:42 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)

Add copy-pipe mode command to copy selection and also pipe to a command.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Mar 22 15:50:42 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.41: +1 -4 lines
Diff to previous 1.41 (colored)

Remove unnecessary initializers of cmd_ctx.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Mar 22 15:49:55 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.40: +12 -11 lines
Diff to previous 1.40 (colored)

Add functions to allocate and free command contexts rather than doing it
all on the stack.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 22 10:38:33 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

Don't hang when clearing line in choose mode now that the cursor stays
at the end with wrap.

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

No more lint means no more ARGSUSED.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Mar 21 16:22:48 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.37: +15 -11 lines
Diff to previous 1.37 (colored)

Do not crash when calling choose-tree with a command that changes the mode.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Mar 21 16:20:26 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.36: +1 -3 lines
Diff to previous 1.36 (colored)

No more need for freefn.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 21 16:19:25 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Fix constness of cmd_template_replace, window_choose_add_item and
window_choose_add_window.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 21 16:09:59 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.34: +4 -7 lines
Diff to previous 1.34 (colored)

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

Revision 1.34 / (download) - annotate - [select for diffs], Thu Mar 21 16:09:17 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.33: +2 -6 lines
Diff to previous 1.33 (colored)

Remove free callback for window_choose_data objects.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 21 16:08:25 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.32: +113 -72 lines
Diff to previous 1.32 (colored)

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
- also add a ref to tree_session
- 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

Revision 1.32 / (download) - annotate - [select for diffs], Tue Feb 5 11:08:59 2013 UTC (11 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Automatically reflow wrapped lines when a pane is resized, requested by
many over the years and finally implemented by Richard Woodbury.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Dec 24 12:34:32 2012 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

Add -T option to select-window to toggle to last window if already
current, from Raghavendra D Prabhu.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Dec 24 12:24:21 2012 UTC (11 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.29: +1 -2 lines
Diff to previous 1.29 (colored)

Remove an unnecessary redraw, from Raghavendra D Prabhu.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Oct 26 14:35:42 2012 UTC (11 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Make mouse event structure clearer by defining events (up, click, drag)
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Oct 11 08:53:50 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.27: +8 -7 lines
Diff to previous 1.27 (colored)

Fix a use-after-free when collapsing the tree in choose mode, from
Carl Henrik Lunde.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Oct 2 08:16:28 2012 UTC (11 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.26: +218 -3 lines
Diff to previous 1.26 (colored)

Allow session tree (C-b s) to expand and collapse sessions with
left/right/space keys. From Thomas Adam.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Sep 3 09:57:57 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.25: +33 -1 lines
Diff to previous 1.25 (colored)

add cmd-choose-list to allow arbitrary options to be selected. From
Thomas Adam.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 27 21:29:23 2012 UTC (11 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.24: +86 -43 lines
Diff to previous 1.24 (colored)

Instead of requiring a prompt to enter all numbers >10, go back to
0-9a-z and add A-Z and enter the prompt when M-0 to M-9 are pressed
(like in copy mode). Prompted by request from mcbride@, help from Thomas
Adam.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 14 09:17:14 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.23: +6 -1 lines
Diff to previous 1.23 (colored)

Boldify windows with alerts in choose-* list.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Aug 12 06:22:26 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.22: +2 -5 lines
Diff to previous 1.22 (colored)

Simplify width calculation (all numbers always sequential) and don't
rely on uninitialized data, from Thomas Adam.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Aug 11 06:45:33 2012 UTC (11 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.21: +110 -51 lines
Diff to previous 1.21 (colored)

Instead of numbering choose mode items 0-9a-z and then nothing, number
them all and if there are more than 10 use a prompt when 0-9 is
pressed. From Thomas Adam.

Revision 1.21 / (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.20: +6 -5 lines
Diff to previous 1.20 (colored)

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

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 25 14:27:25 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.19: +59 -9 lines
Diff to previous 1.19 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 25 14:08:55 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.18: +76 -36 lines
Diff to previous 1.18 (colored)

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

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 23 22:40:47 2012 UTC (12 years ago) by nicm
Branch: MAIN
Changes since 1.17: +20 -5 lines
Diff to previous 1.17 (colored)

Use a helper function to fire choose callback.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 29 21:49:06 2010 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Support all four of the xterm mouse modes. Based on a diff from hsim at
gmx.li.

Revision 1.16 / (download) - annotate - [select for diffs], Sun May 23 19:42:19 2010 UTC (13 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)

Pass in the session, rather than the client, to window modes' key()
function. We were only ever using the client to find the session anyway.

This allows send-key to work properly for manipulating copy mode from
outside tmux.

From Micah Cowan.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 1 22:15:51 2010 UTC (14 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.14: +30 -5 lines
Diff to previous 1.14 (colored)

Add scroll-up/scroll-down for choose/more mode, from Micah Cowan.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 11 23:46:22 2010 UTC (14 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

key should be an int not a char.

Revision 1.13 / (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.12: +6 -6 lines
Diff to previous 1.12 (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.12 / (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.11: +3 -1 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 17 13:06:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.10: +60 -4 lines
Diff to previous 1.10 (colored)

In choose mode, assign each item a number or lowercase letter from those
available and accept that as a shortcut key for the item.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Oct 11 07:01:10 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.9: +8 -8 lines
Diff to previous 1.9 (colored)

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.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Sep 10 17:16:24 2009 UTC (14 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.8: +5 -4 lines
Diff to previous 1.8 (colored)

Permit options such as status-bg to be configured using the entire 256 colour
palette by setting "colour0" to "colour255".

Revision 1.8 / (download) - annotate - [select for diffs], Wed Aug 5 16:26:38 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

If colours are not supported by the terminal, try to emulate a coloured
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.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 30 07:04:50 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
modes.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jul 28 07:03:32 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Next step towards customisable mode keys: build each default table of keys into
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).

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jul 27 19:29:35 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.4: +14 -10 lines
Diff to previous 1.4 (colored)

Change mode key bindings from big switches into a set of tables. Rather than
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.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jul 27 18:51:46 2009 UTC (14 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.3: +1 -3 lines
Diff to previous 1.3 (colored)

Get rid of empty mode_key_free function.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jul 17 07:05:58 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.2: +19 -10 lines
Diff to previous 1.2 (colored)

A similar for fix for window_choose: don't rely on the callback always being
called to free data, have a separate free callback and call it from the mode
cleanup code.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 24 23:00:31 2009 UTC (14 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.1: +5 -4 lines
Diff to previous 1.1 (colored)

Now that a UTF-8-capable puts function exists, use it for printing strings in
choice/more modes - lines with UTF-8 now display properly in find-window
results.

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.