Add prompt-command-cursor-style, from Joshua Cooper in GitHub issue 4765.

This commit is contained in:
nicm
2025-12-22 08:41:01 +00:00
parent a22ec275b4
commit d005803934
3 changed files with 19 additions and 1 deletions

View File

@@ -971,6 +971,15 @@ const struct options_table_entry options_table[] = {
.text = "Style of the cursor when in the command prompt." .text = "Style of the cursor when in the command prompt."
}, },
{ .name = "prompt-command-cursor-style",
.type = OPTIONS_TABLE_CHOICE,
.scope = OPTIONS_TABLE_SESSION,
.choices = options_table_cursor_style_list,
.default_num = 0,
.text = "Style of the cursor in the command prompt when in command "
"mode, if 'status-keys' is set to 'vi'."
},
{ .name = "session-status-current-style", { .name = "session-status-current-style",
.type = OPTIONS_TABLE_STRING, .type = OPTIONS_TABLE_STRING,
.scope = OPTIONS_TABLE_WINDOW, .scope = OPTIONS_TABLE_WINDOW,

View File

@@ -804,7 +804,10 @@ status_prompt_redraw(struct client *c)
n = options_get_number(s->options, "prompt-cursor-colour"); n = options_get_number(s->options, "prompt-cursor-colour");
sl->active->default_ccolour = n; sl->active->default_ccolour = n;
n = options_get_number(s->options, "prompt-cursor-style"); if (c->prompt_mode == PROMPT_COMMAND)
n = options_get_number(s->options, "prompt-command-cursor-style");
else
n = options_get_number(s->options, "prompt-cursor-style");
screen_set_cursor_style(n, &sl->active->default_cstyle, screen_set_cursor_style(n, &sl->active->default_cstyle,
&sl->active->default_mode); &sl->active->default_mode);

6
tmux.1
View File

@@ -4696,6 +4696,12 @@ Set the style of the cursor in the command prompt.
See the See the
.Ic cursor-style .Ic cursor-style
options for available styles. options for available styles.
.It Ic prompt-command-cursor-style Ar style
Set the style of the cursor in the command prompt when vi keys are enabled and
the prompt is in command mode.
See the
.Ic cursor-style
options for available styles.
.It Xo Ic renumber-windows .It Xo Ic renumber-windows
.Op Ic on | off .Op Ic on | off
.Xc .Xc