summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options-table.c15
-rw-r--r--status.c18
-rw-r--r--tmux.16
3 files changed, 36 insertions, 3 deletions
diff --git a/options-table.c b/options-table.c
index 2658f251..0129b0b9 100644
--- a/options-table.c
+++ b/options-table.c
@@ -194,6 +194,21 @@ const struct options_table_entry session_options_table[] = {
.default_num = 3
},
+ { .name = "message-command-attr",
+ .type = OPTIONS_TABLE_ATTRIBUTES,
+ .default_num = 0
+ },
+
+ { .name = "message-command-bg",
+ .type = OPTIONS_TABLE_COLOUR,
+ .default_num = 0
+ },
+
+ { .name = "message-command-fg",
+ .type = OPTIONS_TABLE_COLOUR,
+ .default_num = 3
+ },
+
{ .name = "message-fg",
.type = OPTIONS_TABLE_COLOUR,
.default_num = 0
diff --git a/status.c b/status.c
index 50e7302e..86f7e8c9 100644
--- a/status.c
+++ b/status.c
@@ -919,9 +919,16 @@ status_prompt_redraw(struct client *c)
off = 0;
memcpy(&gc, &grid_default_cell, sizeof gc);
- colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
- colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
- gc.attr |= options_get_number(&s->options, "message-attr");
+ /* Change colours for command mode. */
+ if (c->prompt_mdata.mode == 1) {
+ colour_set_fg(&gc, options_get_number(&s->options, "message-command-fg"));
+ colour_set_bg(&gc, options_get_number(&s->options, "message-command-bg"));
+ gc.attr |= options_get_number(&s->options, "message-command-attr");
+ } else {
+ colour_set_fg(&gc, options_get_number(&s->options, "message-fg"));
+ colour_set_bg(&gc, options_get_number(&s->options, "message-bg"));
+ gc.attr |= options_get_number(&s->options, "message-attr");
+ }
screen_write_start(&ctx, NULL, &c->status);
@@ -977,7 +984,12 @@ status_prompt_key(struct client *c, int key)
c->flags |= CLIENT_STATUS;
}
break;
+ case MODEKEYEDIT_SWITCHMODE:
+ c->flags |= CLIENT_STATUS;
+ break;
case MODEKEYEDIT_SWITCHMODEAPPEND:
+ c->flags |= CLIENT_STATUS;
+ /* FALLTHROUGH */
case MODEKEYEDIT_CURSORRIGHT:
if (c->prompt_index < size) {
c->prompt_index++;
diff --git a/tmux.1 b/tmux.1
index 47e89bf3..47f3692d 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1967,6 +1967,12 @@ from the 256-colour set,
or a hexadecimal RGB string such as
.Ql #ffffff ,
which chooses the closest match from the default 256-colour set.
+.It Ic message-command-attr Ar attributes
+Set status line message attributes when in command mode.
+.It Ic message-command-bg Ar colour
+Set status line message background colour when in command mode.
+.It Ic message-command-fg Ar colour
+Set status line message foreground colour when in command mode.
.It Ic message-fg Ar colour
Set status line message foreground colour.
.It Ic message-limit Ar number