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
nicm
280a962328
Replace two-value prompt_mode enum with a flag.
2026-06-24 11:05:58 +00: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
nicm
8fb484da37
Remove target completion which never worked very well, leave only
...
command completion.
2026-06-24 08:35:46 +00:00
nicm
1b5a07a740
Rename prompt-input to match the usual format names.
2026-06-23 23:52:39 +00:00
nicm
89027bd22c
Fix MOVE flag handling and remove key code (not actually needed).
2026-06-23 21:00:20 +00: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
nicm
265f22be49
Make cursor movement exit incremental prompt (more like emacs).
2026-06-22 19:43:22 +00:00
nicm
af98467d0d
Do not cache format for status line because it stores various pointers
...
that might be stale, instead cache the cmd_find_state and rebuild the
formats every time they are needed. Reported by Marcel Partap in GitHub
isue 5065.
2026-05-08 06:57:38 +00:00
nicm
4a926e489b
Make C-[ have the same bindings as Escape for terminals with extended
...
keys where they are different, GitHub issue 5035 from Eric NICOLAS.
2026-04-28 10:01:07 +00:00
nicm
7a0cc03532
Translate keypad keys to text in prompt input. From Barrett Ruth in
...
GitHub issue 4996.
2026-04-22 07:15:34 +00:00
nicm
147521b757
Add -C flag to command-prompt to match display-message -C (do not freeze
...
panes). From Barrett Ruth in GitHub issue 4978.
2026-04-13 09:33:09 +00:00
nicm
6b056eb53f
Add some new mouse ranges called "control0" to "control9", will be used
...
for controls on floating panes, from Dane Jensen, with some bits from
Michael Grant.
2026-04-03 10:13:20 +00:00
nicm
19f3fb131b
Draw message as one format, allowing prompts and messages to occupy only
...
a portion of the status bar, overlaying the normal status content rather
than replacing the entire line. A new message-format option now controls
the entire message (like status-format). From Conor Taylor in GitHub
issue 4861.
2026-03-12 07:25:13 +00:00
nicm
0dc1b5adfb
Do not leak list on failure, reported by Huihui Huang.
2026-02-23 08:58:40 +00:00
nicm
1e5f93b7b6
Add -e flag to command-prompt to close if empty, from Dane Jensen in
...
GitHub issue 4812.
2026-01-14 19:43:43 +00:00
nicm
d005803934
Add prompt-command-cursor-style, from Joshua Cooper in GitHub issue 4765.
2025-12-22 08:41:01 +00:00
nicm
a22ec275b4
With status-keys vi, move the cursor left by one when pressing Escape to
...
enter command mode, like vi. GitHub issue 4767 from Joshua Cooper.
2025-12-22 08:39:35 +00:00
nicm
a0dfef3b04
Place cursor on correct line if message-line is not 0, reported by
...
Alexis Hildebrandt.
2025-11-26 18:57:18 +00:00
nicm
37a2c98d3d
Expand prompts when they are used rather than ahead of time, so the
...
input can be used as part of the format.
2025-05-12 10:34:13 +00:00
nicm
80eb460fc9
Add display-message -C flag to update pane while message is displayed,
...
GitHub issue 4363 from Vitaly Ostrosablin.
2025-02-10 08:14:32 +00:00
nicm
125a7b9177
Fix issues in the command prompt: set PROMPT_QUOTENEXT after quoting
...
than before, meaning that accidentally scrolling the mouse wheel doesn't
break quoting; and move the cursor correctly over wide characters. From
Alexander Arch in GitHub issue 4212.
2024-10-28 08:11:59 +00:00
nicm
71a503e40c
Allow control characters to be entered at the command prompt prefixed
...
with with C-v, from Alexander Arch in GitHub issue 4206.
2024-10-25 15:32:51 +00:00
nicm
00412b570b
Put the prompt cursor attributes into the status line screen and use
...
that rather than updating the current screen (since there might not be
one).
2024-10-08 06:29:44 +00:00
nicm
735082b7c2
Add prompt-cursor-colour and prompt-cursor-style to set the style of the
...
cursor in the command prompt and remove the emulated cursor, from
Alexander Arch in GitHub issue 4170.
2024-10-07 12:58:36 +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
4860a58d07
Clear overlay when command prompt is entered. Also fix some spacing in
...
man page pointed out by jmc.
2024-08-22 09:05:51 +00:00
nicm
06292baadc
Add mirrored versions of the main-horizontal and main-vertical layouts where
...
the main pane is bottom or right instead of top or left, from Sherwyn Sen.
2024-08-21 05:03:13 +00:00
nicm
c7e61a01e5
Revamp extended keys support to more closely match xterm and support
...
mode 2 as well as mode 1. From Stanislav Kljuhhin (GitHub issue 4038).
This changes tmux to always request mode 2 from parent terminal, change
to an unambiguous internal representation of keys, and adds an option
(extended-keys-format) to control the format similar to the xterm(1)
formatOtherKeys resource.
2024-08-21 04:17:09 +00:00
nicm
bfd65398a9
Fix memory leaks reported by Lu Ming Yin.
2024-05-15 08:39:30 +00:00
nicm
88fd1f00b8
Handle NULL client (in config file) when showing a status message; also
...
copy the file when processing if-shell since it may be freed. GitHub
issue 3746.
2023-11-14 15:59:49 +00:00
nicm
b770a429c6
Add an option menu-selected-style to configure the currently selected
...
menu item, from Alexis Hildebrandt.
2023-08-15 07:01:47 +00:00
nicm
dee72ed41f
Add options and flags for menu styles similar to those existing for
...
popups, from Alexis Hildebrandt. GitHub issue 3650.
2023-08-08 08:08:47 +00:00
nicm
48eba4c195
Ignore the user keys range when checking if a key is Unicode.
2023-04-17 18:22:24 +00:00
nicm
3aa458ea63
Add a flag to display-menu to select the manu item chosen first, GitHub
...
issue 3442.
2023-01-20 21:36:00 +00:00
nicm
9ab1ba36cd
Use correct option name.
2022-09-10 17:01:33 +00:00
nicm
f03c3ca6c3
Add message-line option to control where message and prompt go, from
...
Varun Kumar E in GitHub issue 3324.
2022-09-09 11:02:23 +00:00
nicm
58c8ea1209
Remove duplicates from completion list, GitHub issue 3178.
2022-05-30 13:07:46 +00:00
nicm
a731b1a916
Pass client when adding menu item, GitHub issue 3103.
2022-03-07 11:52:09 +00:00
nicm
948d2fad0a
Use format_draw for command prompt prefix to allow styles, GitHub issue
...
3054.
2022-02-03 10:07:11 +00:00
nicm
b55f0ac6b9
Leave the hardware cursor at the position of the selected line in choose
...
modes and current editing position and at the command prompt. It is
invisible but this is helpful for people using screen readers. GitHub
issue 2970.
2021-11-15 10:58:13 +00:00
nicm
4fe5aa99fb
Fix a comparison, from Ben Boeckel, and a crash when opening completion
...
menu, from Anindya Mukherjee.
2021-11-01 07:48:04 +00:00
nicm
9695114230
Accept some emacs control keys in vi normal mode, from Alexis
...
Hildebrandt in GitHub issue 2922.
2021-10-26 12:29:41 +00:00
nicm
e463e8622d
Remove stray spaces after function names.
2021-08-20 17:50:42 +00:00
nicm
6feb8f6505
Use COLOUR_DEFAULT not hardcoded 8.
2021-08-12 20:09:34 +00:00
nicm
77b1290698
More accurate vi(1) word navigation in copy mode and on the status line.
...
This changes the meaning of the word-separators option - setting it to
the empty string is equivalent to the previous behavior. From Will Noble
in GitHub issue 2693.
2021-06-10 07:56:47 +00:00
nicm
866117636e
Add different command historys for different types of prompts
...
("command", "search" etc). From Anindya Mukherjee.
2021-06-10 07:50:03 +00:00
nicm
f02a6c34e0
Move "special" keys into the Unicode PUA rather than making them top bit
...
set, some compilers do not allow enums that are larger than int. GitHub
issue 2673.
2021-06-10 07:38:28 +00:00
nicm
9f38a8807c
Include current client in size calculation for new sessions, GitHub
...
issue 2662.
2021-06-10 07:24:45 +00:00
nicm
e6abe55134
Add a flag to disable keys to close a message, GitHub issue 2625.
2021-04-12 09:36:12 +00:00