Commit Graph

109 Commits

Author SHA1 Message Date
Thomas Adam
705fbf92ee Merge branch 'obsd-master' 2026-06-28 21:49:05 +01:00
nicm
7cd33ce0dd Set view name immediately when entering mode. 2026-06-27 12:37:36 +00:00
Thomas Adam
91e30f4f22 Merge branch 'obsd-master' 2026-06-26 21:15:06 +01:00
nicm
5be44a6c03 Use linked sessions not active. 2026-06-26 19:53:47 +00:00
Thomas Adam
8cc20a5618 Merge branch 'obsd-master' 2026-06-26 19:00:06 +01:00
nicm
c0f213b056 Add info modes to tree mode like for clients. 2026-06-26 17:43:15 +00:00
Thomas Adam
30e84ff687 Merge branch 'obsd-master' 2026-06-26 13:00:09 +01:00
nicm
73fd01c986 Some colour fixes and tweaks (marked pane, cursor colours now work). 2026-06-26 11:36:22 +00:00
Thomas Adam
19d70a85fc Merge branch 'obsd-master' 2026-06-26 09:30:07 +01:00
nicm
f5e9bcc1fc Another couple of bits look nicer in grey. 2026-06-26 08:19:44 +00:00
nicm
3631f81236 Apply better colours to various builtin bits in modes. 2026-06-26 08:10:48 +00:00
Thomas Adam
0b538b6f2a Merge branch 'obsd-master' 2026-06-25 13:29:53 +01:00
nicm
51d037e881 Major rework of prompts. The basic prompt mechanics (draw, editing, etc)
are now wrapped up in prompt*.c and do not depend on a client. These
functions are used to provide the original client prompt but also to
allow panes to have their own prompts, which works much much better for
floating panes. The mode prompts for both the tree modes and copy mode
are switched over to be per pane.

There are some visible changes (some of these may be changed if they
don't seem to be working well):

- Prompts in modes now appear in the bottom line, covering whatever
  content was there.

- command-prompt has a -P flag to open a pane prompt.

- Because they cover the content, the default style for prompts in modes
  now does not fill the entire line; the main command prompt stays the
  same.

- The old completion menu has gone, and completions are now shown after
  the text. Builtin aliases are no longer completed.

- Clicking the mouse on the prompt now moves the cursor or selects a
  completion.
2026-06-25 11:39:11 +00:00
Thomas Adam
12473bb6d3 Merge branch 'obsd-master' 2026-06-24 12:15:06 +01:00
nicm
37633ff957 Add some enums for prompt return values to make them a bit less confusing. 2026-06-24 10:55:39 +00:00
Thomas Adam
00b0af7021 Merge branch 'obsd-master' 2026-06-23 22:15:06 +01:00
nicm
89027bd22c Fix MOVE flag handling and remove key code (not actually needed). 2026-06-23 21:00:20 +00:00
Thomas Adam
c2ad33a04c Merge branch 'obsd-master' 2026-06-23 21:15:06 +01:00
nicm
c0a5e10313 Use flags for input callback instead of a single int done so the
callback can be told about cursor movement in an incremental prompt.
2026-06-23 20:07:58 +00:00
Thomas Adam
e7c29d0ceb Merge branch 'obsd-master' 2026-06-19 19:00:05 +01:00
nicm
6c46358be8 Draw help directly instead of using a popup. 2026-06-19 17:37:26 +00:00
Thomas Adam
6f683da2e9 Merge branch 'obsd-master' 2026-06-08 23:00:06 +01:00
nicm
a6a06c5aa6 Fix squash-groups skipping every session, GitHub issue 5180 from Bryce
Miller.
2026-06-08 21:46:19 +00:00
Thomas Adam
a25ce36925 Merge branch 'obsd-master' 2026-06-08 22:15:06 +01:00
nicm
a0f4038df2 Add a -h flag to choose-tree and choose-client to hide the pane
containing the mode, intended for use with floating panes. From Michael
Grant, GitHub issue 5177.
2026-06-08 21:01:33 +00:00
Thomas Adam
0eff3b6b97 Merge branch 'obsd-master' 2026-06-01 19:30:06 +01:00
nicm
f6557d1ea2 Add a Z sort order in tree mode. 2026-06-01 18:19:51 +00:00
Thomas Adam
718eb2b4cc Merge branch 'obsd-master' 2026-06-01 19:15:06 +01:00
nicm
cd6c01e42b Mark floating panes in tree mode. 2026-06-01 18:00:20 +00:00
Thomas Adam
a9ba7b8ecb Merge branch 'obsd-master' 2026-05-18 09:38:02 +01:00
nicm
a8520ba59e Bring over some of layout and positioning code for floating panes, by
Michael Grant.
2026-05-17 16:01:42 +00:00
Thomas Adam
9d3dcdbc38 Merge branch 'obsd-master' 2026-05-03 20:01:09 +01:00
nicm
d52fabce72 Allow the indicator in tree mode to be customized by two new options:
tree-mode-preview-format and tree-mode-preview-style.
2026-05-03 15:02:48 +00:00
Thomas Adam
bef4865d91 Merge branch 'obsd-master' 2026-03-12 16:01:08 +00:00
nicm
fd62f419ac Add a short builtin help text for each mode accessible with C-h,
based on code from Patrick Motard in GitHub issue 4751.
2026-03-12 12:40:40 +00:00
Thomas Adam
615c27c117 Merge branch 'obsd-master' 2026-02-02 19:06:25 +00:00
nicm
3c3d9ce3a9 Break sorting out into a common file so formats and modes use the same
code. Also add -O for sorting to the list commands. From Dane Jensen in
GitHub issue 4813.
2026-02-02 10:08:30 +00:00
Thomas Adam
e560a09db0 Merge branch 'obsd-master' 2025-10-28 15:16:58 +00:00
nicm
9bf8ca5856 Support case insensitive search in modes in the same way as copy mode
(like emacs, so all-lowercase means case insensitive). GitHub issue
4396.
2025-10-28 14:21:06 +00:00
Nicholas Marriott
bb4866047a Fix build. 2025-08-22 12:58:19 +01:00
nicm
e6d275b371 Do not leak label if it is too long, GitHub issue 4591. 2025-08-22 07:39:40 +00:00
nicm
d90e7623c6 Free command on failure, GitHub issue 4578. 2025-08-12 12:26:09 +00:00
nicm
b905039ed2 Improve #? conditional expression in formats:
1) add support for else if, so
   #{?cond1,value1,#{?cond2,value2,else-value}} can be changed to
   #{?cond1,value1,cond2,value2,else-value};

2) add default empty string if there's no else value, so
   #{?cond1,value1,} can be changed to #{?cond1,value1}.

From David Mandelberg in GitHub issue 4451.
2025-04-22 12:23:26 +00:00
nicm
4bf38da4d4 Only align panes and windows, not sessions, from David Mandelberg in
GitHub issue 4444.
2025-04-02 09:31:00 +00:00
nicm
34a35b0f09 Expand formats with the pane modifier in tree mode so that #() doesn't
always use the same value. From Michael Grant in GitHub issues 4412 and
4420.
2025-03-24 20:13:03 +00:00
nicm
a541be3951 Add S-Up and S-Down to move windows in tree mode. From David Mandelberg
in GitHub issue 4415.
2025-03-21 13:36:42 +00:00
nicm
5a68730e2f Add -y flag to disable confirmation prompts in modes, GitHub issue 4152. 2024-10-04 19:16:13 +00:00
nicm
a2a02fd7d7 Change a few types to fix warnings, from Thomas Klausner. 2023-06-30 21:55:08 +00:00
nicm
9360e0ef32 Sort panes by index not by ID, GitHub issue 3249. 2022-07-04 08:39:45 +00:00
nicm
0a8f356c72 Spacing/style nits. 2022-05-30 12:55:25 +00:00