mirror of
https://github.com/tmux/tmux.git
synced 2026-04-15 19:46:27 +00:00
Add -C flag to command-prompt to match display-message -C (do not freeze
panes). From Barrett Ruth in GitHub issue 4978.
This commit is contained in:
@@ -42,8 +42,8 @@ const struct cmd_entry cmd_command_prompt_entry = {
|
|||||||
.name = "command-prompt",
|
.name = "command-prompt",
|
||||||
.alias = NULL,
|
.alias = NULL,
|
||||||
|
|
||||||
.args = { "1beFiklI:Np:t:T:", 0, 1, cmd_command_prompt_args_parse },
|
.args = { "1CbeFiklI:Np:t:T:", 0, 1, cmd_command_prompt_args_parse },
|
||||||
.usage = "[-1beFiklN] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE
|
.usage = "[-1CbeFiklN] [-I inputs] [-p prompts] " CMD_TARGET_CLIENT_USAGE
|
||||||
" [-T prompt-type] [template]",
|
" [-T prompt-type] [template]",
|
||||||
|
|
||||||
.flags = CMD_CLIENT_TFLAG,
|
.flags = CMD_CLIENT_TFLAG,
|
||||||
@@ -165,6 +165,8 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
cdata->flags |= PROMPT_KEY;
|
cdata->flags |= PROMPT_KEY;
|
||||||
else if (args_has(args, 'e'))
|
else if (args_has(args, 'e'))
|
||||||
cdata->flags |= PROMPT_BSPACE_EXIT;
|
cdata->flags |= PROMPT_BSPACE_EXIT;
|
||||||
|
if (args_has(args, 'C'))
|
||||||
|
cdata->flags |= PROMPT_NOFREEZE;
|
||||||
status_prompt_set(tc, target, cdata->prompts[0].prompt,
|
status_prompt_set(tc, target, cdata->prompts[0].prompt,
|
||||||
cdata->prompts[0].input, cmd_command_prompt_callback,
|
cdata->prompts[0].input, cmd_command_prompt_callback,
|
||||||
cmd_command_prompt_free, cdata, cdata->flags, cdata->prompt_type);
|
cmd_command_prompt_free, cdata, cdata->flags, cdata->prompt_type);
|
||||||
|
|||||||
2
status.c
2
status.c
@@ -728,7 +728,7 @@ status_prompt_set(struct client *c, struct cmd_find_state *fs,
|
|||||||
c->prompt_type = prompt_type;
|
c->prompt_type = prompt_type;
|
||||||
c->prompt_mode = PROMPT_ENTRY;
|
c->prompt_mode = PROMPT_ENTRY;
|
||||||
|
|
||||||
if (~flags & PROMPT_INCREMENTAL)
|
if ((~flags & PROMPT_INCREMENTAL) && (~flags & PROMPT_NOFREEZE))
|
||||||
c->tty.flags |= TTY_FREEZE;
|
c->tty.flags |= TTY_FREEZE;
|
||||||
c->flags |= CLIENT_REDRAWSTATUS;
|
c->flags |= CLIENT_REDRAWSTATUS;
|
||||||
|
|
||||||
|
|||||||
5
tmux.1
5
tmux.1
@@ -6911,7 +6911,7 @@ See
|
|||||||
for possible values for
|
for possible values for
|
||||||
.Ar prompt\-type .
|
.Ar prompt\-type .
|
||||||
.It Xo Ic command\-prompt
|
.It Xo Ic command\-prompt
|
||||||
.Op Fl 1beFiklN
|
.Op Fl 1bCeFiklN
|
||||||
.Op Fl I Ar inputs
|
.Op Fl I Ar inputs
|
||||||
.Op Fl p Ar prompts
|
.Op Fl p Ar prompts
|
||||||
.Op Fl t Ar target\-client
|
.Op Fl t Ar target\-client
|
||||||
@@ -6981,6 +6981,9 @@ is like
|
|||||||
but the key press is translated to a key name.
|
but the key press is translated to a key name.
|
||||||
.Fl N
|
.Fl N
|
||||||
makes the prompt only accept numeric key presses.
|
makes the prompt only accept numeric key presses.
|
||||||
|
If
|
||||||
|
.Fl C
|
||||||
|
given, panes will continue to be updated while the prompt is displayed.
|
||||||
.Fl i
|
.Fl i
|
||||||
executes the command every time the prompt input changes instead of when the
|
executes the command every time the prompt input changes instead of when the
|
||||||
user exits the command prompt.
|
user exits the command prompt.
|
||||||
|
|||||||
1
tmux.h
1
tmux.h
@@ -2112,6 +2112,7 @@ struct client {
|
|||||||
#define PROMPT_ACCEPT 0x20
|
#define PROMPT_ACCEPT 0x20
|
||||||
#define PROMPT_QUOTENEXT 0x40
|
#define PROMPT_QUOTENEXT 0x40
|
||||||
#define PROMPT_BSPACE_EXIT 0x80
|
#define PROMPT_BSPACE_EXIT 0x80
|
||||||
|
#define PROMPT_NOFREEZE 0x100
|
||||||
int prompt_flags;
|
int prompt_flags;
|
||||||
enum prompt_type prompt_type;
|
enum prompt_type prompt_type;
|
||||||
int prompt_cursor;
|
int prompt_cursor;
|
||||||
|
|||||||
Reference in New Issue
Block a user