diff --git a/options-table.c b/options-table.c index 4385c9fd..f056966d 100644 --- a/options-table.c +++ b/options-table.c @@ -971,6 +971,15 @@ const struct options_table_entry options_table[] = { .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", .type = OPTIONS_TABLE_STRING, .scope = OPTIONS_TABLE_WINDOW, diff --git a/status.c b/status.c index 3cda11fb..79ce9cad 100644 --- a/status.c +++ b/status.c @@ -804,7 +804,10 @@ status_prompt_redraw(struct client *c) n = options_get_number(s->options, "prompt-cursor-colour"); 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, &sl->active->default_mode); diff --git a/tmux.1 b/tmux.1 index 2af98b8f..fe228dd2 100644 --- a/tmux.1 +++ b/tmux.1 @@ -4696,6 +4696,12 @@ Set the style of the cursor in the command prompt. See the .Ic cursor-style 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 .Op Ic on | off .Xc