OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.63 / (download) - annotate - [select for diffs], Fri Jun 30 21:55:09 2023 UTC (10 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Change a few types to fix warnings, from Thomas Klausner.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jul 4 08:39:45 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.61: +8 -5 lines
Diff to previous 1.61 (colored)

Sort panes by index not by ID, GitHub issue 3249.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Jul 4 08:24:36 2022 UTC (22 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.60: +7 -2 lines
Diff to previous 1.60 (colored)

Mouse clicks could change current item, so work it out again. GitHub
issue 3242.

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 30 12:55:25 2022 UTC (23 months, 2 weeks ago) by nicm
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

Spacing/style nits.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 20 09:50:40 2021 UTC (2 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.58: +3 -2 lines
Diff to previous 1.58 (colored)

Add -T to set a popup title, from Alexis Hildebrandt in GitHub issue 2941.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Oct 14 13:19:01 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Add popup-border-lines option to set popup line style, from Alexis
Hildebrandt, GitHub issue 2930.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 13 09:28:36 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Add popup-style and popup-border-style options, from Alexis Hildebrandt
in GitHub issue 2927.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Aug 20 19:50:17 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

Hide struct args behind a couple of accessor functions.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Jun 10 07:50:04 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

Add different command historys for different types of prompts
("command", "search" etc). From Anindya Mukherjee.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Apr 12 06:50:25 2021 UTC (3 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.53: +50 -4 lines
Diff to previous 1.53 (colored)

Permit shortcut keys in buffer, client, tree modes to be configured with
a format; the default remains the line number. GitHub issue 2636.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Dec 3 07:12:12 2020 UTC (3 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.52: +13 -1 lines
Diff to previous 1.52 (colored)

Redraw any visible modes when status line changes so that formats like
the pane title are updated. GitHub issue 2487. Also a man page fix from
jmc.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jul 15 11:03:17 2020 UTC (3 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.51: +4 -2 lines
Diff to previous 1.51 (colored)

Renumber after killing windows for choose-tree.

Revision 1.51 / (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.50: +2 -2 lines
Diff to previous 1.50 (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.50 / (download) - annotate - [select for diffs], Sat May 16 16:16:07 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.49: +6 -5 lines
Diff to previous 1.49 (colored)

Expand target from client and use it to expand the prompt.

Revision 1.49 / (download) - annotate - [select for diffs], Sat May 16 16:02:24 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Add a customize mode where keys and options may be browsed and changed,
includes adding a brief description of each option. Bound to "C" by
default.

Revision 1.48 / (download) - annotate - [select for diffs], Sat May 16 14:10:29 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.47: +5 -5 lines
Diff to previous 1.47 (colored)

Tweak the default choose modes formats:

- Only show pane title if it is not default and not empty.
- Add a prettier time format and use that instead of long ctime().
- Remove clutter and change the order.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Apr 22 21:01:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.46: +21 -3 lines
Diff to previous 1.46 (colored)

Indicate the marked pane in choose mode in reverse and add key to set
and clear it (m and M) and a key to jump to the starting pane (H).

Revision 1.46 / (download) - annotate - [select for diffs], Thu Apr 9 15:35:27 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

More style nits.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Mar 20 17:26:14 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Fix positioning of menu in choose modes and a couple of keys in tree mode.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jan 8 06:38:55 2020 UTC (4 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Add -Z to default switch-client command in tree mode, matches previous
behaviour.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Dec 3 10:47:23 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)

Style nits in function arguments.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Oct 15 08:30:36 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

Rewrite options_array_set to be clearer and remove a spurious warning
with newer GCC. From Ben Boeckel.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Sep 25 19:05:59 2019 UTC (4 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Style and line length nits.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Aug 16 11:49:12 2019 UTC (4 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.39: +89 -81 lines
Diff to previous 1.39 (colored)

Add a flag to reverse sort in the various choose modes, from Benjamin
Poirier in GitHub issue 1875.

Revision 1.39 / (download) - annotate - [select for diffs], Tue May 28 07:18:42 2019 UTC (4 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.38: +17 -14 lines
Diff to previous 1.38 (colored)

Change display-menu from taking a single string to a set of arguments,
which is much easier to work with. Based on a diff from Avi Halachmi.

Revision 1.38 / (download) - annotate - [select for diffs], Sun May 12 08:58:09 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.37: +32 -7 lines
Diff to previous 1.37 (colored)

Add simple menus to tree, client, buffer modes.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Apr 30 06:19:51 2019 UTC (5 years ago) by nicm
Branch: MAIN
Changes since 1.36: +6 -3 lines
Diff to previous 1.36 (colored)

Fix memory leak in window tree search, from Amos Bird.

Revision 1.36 / (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.35: +2 -2 lines
Diff to previous 1.35 (colored)

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

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 18 14:10:25 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

Add format variables for the default formats for the various modes
(tree_mode_format and so on) and add a -a flag to display-message to
list variables with values.

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

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

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 7 20:24:21 2019 UTC (5 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.32: +16 -13 lines
Diff to previous 1.32 (colored)

Add a separate mode struct for the active window mode if any.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Dec 18 13:20:44 2018 UTC (5 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.31: +5 -4 lines
Diff to previous 1.31 (colored)

Pass window into mode functions.

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

Expand \u and \U escape sequences in command strings, from Christopher
Hunt in GitHub issue 1443.

Revision 1.30 / (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.29: +120 -6 lines
Diff to previous 1.29 (colored)

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

Revision 1.29 / (download) - annotate - [select for diffs], Thu Mar 29 08:03:51 2018 UTC (6 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Do not crash on empty window, reported by Jamie Macdonald in GitHub
issue 1299. Patch from Thomas Adam.

Revision 1.28 / (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.27: +2 -1 lines
Diff to previous 1.27 (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.27 / (download) - annotate - [select for diffs], Fri Nov 3 17:02:33 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.26: +96 -9 lines
Diff to previous 1.26 (colored)

Support mouse on preview in tree mode.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Nov 2 22:00:42 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.25: +27 -30 lines
Diff to previous 1.25 (colored)

Make the mode draw function use the parent screen directly rather than
its own to avoid copying twice.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Nov 2 18:52:05 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.24: +3 -5 lines
Diff to previous 1.24 (colored)

Format for group list of "other sessions" is a bit weird, just list all
the sessions in the group.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 2 18:43:51 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.23: +9 -5 lines
Diff to previous 1.23 (colored)

Tweak previous slightly so that current session is chosen if it is in
the group rather than first.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Nov 2 18:27:35 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.22: +14 -3 lines
Diff to previous 1.22 (colored)

Only show the first member of session groups in tree mode (-G flag
disables).

Revision 1.22 / (download) - annotate - [select for diffs], Thu Oct 26 08:17:12 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Fix crash exiting command prompt (from Alex Maese in GitHub issue 1139)
and a man page tweak from jmc.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Oct 25 11:26:11 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.20: +10 -16 lines
Diff to previous 1.20 (colored)

Add P key to paste tagged in buffer mode, and trim some code that should
no longer be necessary.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Oct 22 13:16:54 2017 UTC (6 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.19: +5 -3 lines
Diff to previous 1.19 (colored)

Use window_pane_index() when drawing pane numbers (so pane-base-index is
applied), from Thomas Adam. GitHub issue 1125.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 11 12:57:49 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.18: +25 -11 lines
Diff to previous 1.18 (colored)

Box around label in preview.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Oct 11 08:08:16 2017 UTC (6 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.17: +5 -2 lines
Diff to previous 1.17 (colored)

Add C-n and C-p keys for tree mode, and choose the right initial line
when no panes.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 30 10:33:57 2017 UTC (6 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Pass flags into cmd_find_from_* to fix prefer-unattached, reported by
Thomas Sattler.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Aug 9 13:44:36 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.15: +34 -17 lines
Diff to previous 1.15 (colored)

Fix filtering so it works after the change to only show windows if they
have multiple panes.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Aug 9 11:43:45 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.14: +27 -14 lines
Diff to previous 1.14 (colored)

Add -F to choose-tree, choose-client, choose-buffer to specify the
format of each line, as well as adding a couple of formats needed for
the default display.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jul 28 10:59:58 2017 UTC (6 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

Show pane title in window list for windows with only one pane.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jul 12 14:31:06 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.12: +5 -1 lines
Diff to previous 1.12 (colored)

Line up keys in tree mode, and don't expand windows with one pane. From
Thomas Adam.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 7 16:27:26 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Fix size of rightmost preview section.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 4 22:21:31 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.10: +33 -8 lines
Diff to previous 1.10 (colored)

< and > keys to scroll preview list left and right in tree mode.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jul 4 12:26:14 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.9: +1 -5 lines
Diff to previous 1.9 (colored)

Handle 0 size of preview box in caller.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 3 22:48:02 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.8: +161 -59 lines
Diff to previous 1.8 (colored)

Change session and window preview so that the current window or pane is
always shown.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 30 22:37:35 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Don't write over right border.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 30 22:36:11 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.6: +11 -5 lines
Diff to previous 1.6 (colored)

Fix previous when we end up able to show no panes.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 30 22:24:08 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.5: +148 -3 lines
Diff to previous 1.5 (colored)

Try to show a better preview of sessions and windows in tree mode.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 9 16:01:39 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.4: +9 -73 lines
Diff to previous 1.4 (colored)

Extend filters (f key) to buffer and client mode and add -f flag to
specify to command.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 9 15:29:15 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Add -O option to choose-* to set initial sort order.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 7 14:37:30 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.2: +37 -4 lines
Diff to previous 1.2 (colored)

Add simple searching (C-s and n) to the various choose modes: by name
for client and tree, and by name and content for buffer.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 6 15:07:35 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Do not pass a state into commands when fired on individual items in tree
mode, rely on the %% target substitution in the command for the chosen
pane and leave the default target as the current pane (where the mode
is). Otherwise, joinp and similar end up with -t and -s the
same. Reported by Jacob Niehus in GitHub issue 960.

Revision 1.1 / (download) - annotate - [select for diffs], Tue May 30 21:44:59 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN

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.

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.